(eliminate_regs_in_insn): Don't use a later elimination than

eliminate_regs would use.

From-SVN: r4663
This commit is contained in:
Richard Kenner 1993-06-11 21:40:32 -04:00
parent eda115ddc4
commit 922d9d40d1
1 changed files with 15 additions and 7 deletions

View File

@ -3107,8 +3107,13 @@ eliminate_regs_in_insn (insn, replace)
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; for (ep = reg_eliminate; ep < &reg_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))) {
/* We must stop at the first elimination that will be used.
If this one would replace the PLUS with a REG, do it
now. Otherwise, quit the loop and let eliminate_regs
do its normal replacement. */
if (ep->offset == - INTVAL (XEXP (SET_SRC (old_body), 1)))
{ {
PATTERN (insn) = gen_rtx (SET, VOIDmode, PATTERN (insn) = gen_rtx (SET, VOIDmode,
SET_DEST (old_body), ep->to_rtx); SET_DEST (old_body), ep->to_rtx);
@ -3116,6 +3121,9 @@ eliminate_regs_in_insn (insn, replace)
val = 1; val = 1;
goto done; goto done;
} }
break;
}
} }
old_asm_operands_vec = 0; old_asm_operands_vec = 0;