https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117699
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-11-20 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think the problem is in peep2_find_free_register: /* Don't use registers set or clobbered by the insn. */ FOR_EACH_INSN_DEF (def, peep2_insn_data[from].insn) SET_HARD_REG_BIT (live, DF_REF_REGNO (def)); This only sets the live info based on the regno here. But it should be instead (with fixed formating): ``` /* Don't use registers set or clobbered by the insn. */ FOR_EACH_INSN_DEF (def, peep2_insn_data[from].insn) add_to_hard_reg_set (&live, GET_MODE (DF_REF_REAL_REG (def)), DF_REF_REGNO (def)); ``` This is similar to what is done in compute_regs_asm_clobbered (ira.cc).