diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-02-15 07:53:26 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-02-15 07:53:26 -0500 |
commit | 94714ecc92fc575dcc5275ce291cc1681e88e62b (patch) | |
tree | 8db2a45c6e3b7941578a150fd26cb8b05ee15776 | |
parent | a8a8cbb7599563f3a2ae7de6984e1279b3dec3d2 (diff) | |
download | gcc-94714ecc92fc575dcc5275ce291cc1681e88e62b.zip gcc-94714ecc92fc575dcc5275ce291cc1681e88e62b.tar.gz gcc-94714ecc92fc575dcc5275ce291cc1681e88e62b.tar.bz2 |
(eliminate_regs, case USE): If using a register that is source of
elimination, show can't be eliminated.
From-SVN: r11277
-rw-r--r-- | gcc/reload1.c | 14 |
1 files changed, 13 insertions, 1 deletions
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 |