Commit 62874575 by Richard Kenner

(force_reg): Don't make a REG_EQUAL note for an insn that doesn't set

TEMP.

From-SVN: r7771
parent eb3a6507
...@@ -578,15 +578,19 @@ force_reg (mode, x) ...@@ -578,15 +578,19 @@ force_reg (mode, x)
enum machine_mode mode; enum machine_mode mode;
rtx x; rtx x;
{ {
register rtx temp, insn; register rtx temp, insn, set;
if (GET_CODE (x) == REG) if (GET_CODE (x) == REG)
return x; return x;
temp = gen_reg_rtx (mode); temp = gen_reg_rtx (mode);
insn = emit_move_insn (temp, x); insn = emit_move_insn (temp, x);
/* Let optimizers know that TEMP's value never changes /* Let optimizers know that TEMP's value never changes
and that X can be substituted for it. */ and that X can be substituted for it. Don't get confused
if (CONSTANT_P (x)) if INSN set something else (such as a SUBREG of TEMP). */
if (CONSTANT_P (x)
&& (set = single_set (insn)) != 0
&& SET_DEST (set) == temp)
{ {
rtx note = find_reg_note (insn, REG_EQUAL, NULL_RTX); rtx note = find_reg_note (insn, REG_EQUAL, NULL_RTX);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment