From 94714ecc92fc575dcc5275ce291cc1681e88e62b Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 15 Feb 1996 07:53:26 -0500 Subject: [PATCH] (eliminate_regs, case USE): If using a register that is source of elimination, show can't be eliminated. From-SVN: r11277 --- gcc/reload1.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/reload1.c b/gcc/reload1.c index 1853e88..788c36a 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2894,7 +2894,6 @@ eliminate_regs (x, mem_mode, insn) } /* Fall through to generic unary operation case. */ - case USE: case STRICT_LOW_PART: case NEG: case NOT: case SIGN_EXTEND: case ZERO_EXTEND: @@ -2983,6 +2982,19 @@ eliminate_regs (x, mem_mode, insn) return x; + case USE: + /* If using a register that is the source of an eliminate we still + think can be performed, note it cannot be performed since we don't + know how this register is used. */ + for (ep = reg_eliminate; ep < ®_eliminate[NUM_ELIMINABLE_REGS]; ep++) + if (ep->from_rtx == XEXP (x, 0)) + ep->can_eliminate = 0; + + new = eliminate_regs (XEXP (x, 0), mem_mode, insn); + if (new != XEXP (x, 0)) + return gen_rtx (code, GET_MODE (x), new); + return x; + case CLOBBER: /* If clobbering a register that is the replacement register for an elimination we still think can be performed, note that it cannot -- 2.7.4