Embodiments of this disclosure provide an instruction
processing method and apparatus, a processor, an electronic device, and a storage medium. The instruction
processing method includes, in response to identifying a first
conditional branch instruction with a back jump from an
instruction stream, recording instruction information of the first
conditional branch instruction; in response to identifying the first
conditional branch instruction with a back jump at least once more, determining that the first conditional
branch instruction is an end
branch instruction in a loop body instruction and performing a backfilling operation on the loop body instruction, the loop body instruction including at least one second
branch instruction other than the first conditional branch instruction; performing the backfilling operation on the loop body instruction includes: backfilling the instruction information of the second branch instruction into an instruction information cache; invoking a
branch predictor to obtain first prediction information of the second branch instruction, and backfilling the first prediction information into a branch instruction information cache. This instruction
processing method expands the scope of loop body instruction recognition and reduces
cache access power consumption.