(force_reg): Don't make a REG_EQUAL note for an insn that doesn't set
TEMP. From-SVN: r7771
This commit is contained in:
parent
eb3a650753
commit
62874575d9
1 changed files with 7 additions and 3 deletions
10
gcc/explow.c
10
gcc/explow.c
|
@ -578,15 +578,19 @@ force_reg (mode, x)
|
|||
enum machine_mode mode;
|
||||
rtx x;
|
||||
{
|
||||
register rtx temp, insn;
|
||||
register rtx temp, insn, set;
|
||||
|
||||
if (GET_CODE (x) == REG)
|
||||
return x;
|
||||
temp = gen_reg_rtx (mode);
|
||||
insn = emit_move_insn (temp, x);
|
||||
|
||||
/* Let optimizers know that TEMP's value never changes
|
||||
and that X can be substituted for it. */
|
||||
if (CONSTANT_P (x))
|
||||
and that X can be substituted for it. Don't get confused
|
||||
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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue