(eliminate_regs_in_insn): Don't use a later elimination than
eliminate_regs would use. From-SVN: r4663
This commit is contained in:
parent
eda115ddc4
commit
922d9d40d1
|
@ -3107,14 +3107,22 @@ eliminate_regs_in_insn (insn, replace)
|
||||||
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS];
|
for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS];
|
||||||
ep++)
|
ep++)
|
||||||
if (ep->from_rtx == XEXP (SET_SRC (old_body), 0)
|
if (ep->from_rtx == XEXP (SET_SRC (old_body), 0)
|
||||||
&& ep->can_eliminate
|
&& ep->can_eliminate)
|
||||||
&& ep->offset == - INTVAL (XEXP (SET_SRC (old_body), 1)))
|
|
||||||
{
|
{
|
||||||
PATTERN (insn) = gen_rtx (SET, VOIDmode,
|
/* We must stop at the first elimination that will be used.
|
||||||
SET_DEST (old_body), ep->to_rtx);
|
If this one would replace the PLUS with a REG, do it
|
||||||
INSN_CODE (insn) = -1;
|
now. Otherwise, quit the loop and let eliminate_regs
|
||||||
val = 1;
|
do its normal replacement. */
|
||||||
goto done;
|
if (ep->offset == - INTVAL (XEXP (SET_SRC (old_body), 1)))
|
||||||
|
{
|
||||||
|
PATTERN (insn) = gen_rtx (SET, VOIDmode,
|
||||||
|
SET_DEST (old_body), ep->to_rtx);
|
||||||
|
INSN_CODE (insn) = -1;
|
||||||
|
val = 1;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue