Bogus REG_EQUIV note generation [was RE: Deep CSE bug!]
Roger Sayle
roger@eyesopen.com
Mon Jun 21 19:06:00 GMT 2004
On Mon, 21 Jun 2004, Dave Korn wrote:
> - 3208 last_insn = emit_move_insn_1 (x, y);
> 3209
> - 3210 if (y_cst && GET_CODE (x) == REG)
> - 3211 set_unique_reg_note (last_insn, REG_EQUAL, y_cst);
> 3212
> - 3213 return last_insn;
I agree with your analysis. The quick-and-dirty work-around would be
to add something like:
if (y_cst && GET_CODE (x) == REG)
{
rtx set = single_set (last_insn);
if (set != NULL_RTX && SET_DEST (set) == x)
set_unique_reg_note (last_insn, REG_EQUAL, y_cst);
}
However, I much prefer your proposal to pass y_cst to emit_move_insn_1,
and add the appropriate decomposed REQ_EQUAL notes there.
Roger
--
More information about the Gcc
mailing list