https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68910
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |rtl-optimization --- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- This regression was introduced by: 2014-05-28 Richard Sandiford <rdsandif...@googlemail.com> Olivier Hainque <hain...@adacore.com> * rtl.h (set_for_reg_notes): Declare. * emit-rtl.c (set_for_reg_notes): New function. (set_unique_reg_note): Use it. * optabs.c (add_equal_note): Likewise This patch breaks the reload inheritance trick in find_reloads: /* If we made a MEM to load (a part of) the stackslot of a pseudo that didn't get a hard register, emit a USE with a REG_EQUAL note in front so that we might inherit a previous, possibly wider reload. */ if (replace && MEM_P (op) && REG_P (reg) && (GET_MODE_SIZE (GET_MODE (reg)) >= GET_MODE_SIZE (GET_MODE (op))) && reg_equiv_constant (REGNO (reg)) == 0) set_unique_reg_note (emit_insn_before (gen_rtx_USE (VOIDmode, reg), insn), REG_EQUAL, reg_equiv_memory_loc (REGNO (reg))); by emitting a naked USE instead of a USE with a REG_EQUAL note. Then: /* Make a pass over all the insns and delete all USEs which we inserted only to tag a REG_EQUAL note on them. Remove all REG_DEAD and REG_UNUSED notes. Delete all CLOBBER insns, except those that refer to the return value and the special mem:BLK CLOBBERs added to prevent the scheduler from misarranging variable-array code, and simplify (subreg (reg)) operands. Strip and regenerate REG_INC notes that may have been moved around. */ doesn't delete the artificial USEs, thus seriously hindering DSE2.