aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-12-06 17:31:01 -0700
committerJeff Law <law@gcc.gnu.org>1997-12-06 17:31:01 -0700
commit956d69504d77d301015532d2f0564213f0efc706 (patch)
treeec80f8d1e46852ac1ba45aecdcda7201c302ac6f /gcc/reload.c
parent27b6b158c29b45fd80c2f104d5da1f4bc818d7ab (diff)
downloadgcc-956d69504d77d301015532d2f0564213f0efc706.zip
gcc-956d69504d77d301015532d2f0564213f0efc706.tar.gz
gcc-956d69504d77d301015532d2f0564213f0efc706.tar.bz2
Merge from gcc-2.8
From-SVN: r16987
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index c8a30d3a..f8d0b8b 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -260,7 +260,7 @@ static int this_insn_is_asm;
static int hard_regs_live_known;
/* Indexed by hard reg number,
- element is nonegative if hard reg has been spilled.
+ element is nonnegative if hard reg has been spilled.
This vector is passed to `find_reloads' as an argument
and is not changed here. */
static short *static_reload_reg_p;
@@ -4940,7 +4940,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
CALL_INSN - and it does not set CC0.
But don't do this if we cannot directly address the
memory location, since this will make it harder to
- reuse address reloads, and increses register pressure.
+ reuse address reloads, and increases register pressure.
Also don't do this if we can probably update x directly. */
rtx equiv = reg_equiv_mem[regno];
int icode = (int) add_optab->handlers[(int) Pmode].insn_code;
@@ -5351,6 +5351,18 @@ find_replacement (loc)
}
}
+ /* If *LOC is a PLUS, MINUS, or MULT, see if a replacement is scheduled for
+ what's inside and make a new rtl if so. */
+ if (GET_CODE (*loc) == PLUS || GET_CODE (*loc) == MINUS
+ || GET_CODE (*loc) == MULT)
+ {
+ rtx x = find_replacement (&XEXP (*loc, 0));
+ rtx y = find_replacement (&XEXP (*loc, 1));
+
+ if (x != XEXP (*loc, 0) || y != XEXP (*loc, 1))
+ return gen_rtx (GET_CODE (*loc), GET_MODE (*loc), x, y);
+ }
+
return *loc;
}