aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1995-04-17 12:46:50 -0700
committerJim Wilson <wilson@gcc.gnu.org>1995-04-17 12:46:50 -0700
commit4ffeab028f6d04c6c34723c18c0441566363c2a2 (patch)
tree8d4acc2b247dd0588b730ad7980794321dbeef36 /gcc/reload.c
parent79c0672ee61f4484b9d06252fad5086c879a65a9 (diff)
downloadgcc-4ffeab028f6d04c6c34723c18c0441566363c2a2.zip
gcc-4ffeab028f6d04c6c34723c18c0441566363c2a2.tar.gz
gcc-4ffeab028f6d04c6c34723c18c0441566363c2a2.tar.bz2
(find_reloads): Recompute reg_equiv_address from reg_equiv_memory_loc before using it.
(find_reloads): Recompute reg_equiv_address from reg_equiv_memory_loc before using it. (find_reloads_toplev, make_memloc): Likewise. From-SVN: r9395
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index b9d955b..86657516 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -2463,7 +2463,11 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
{
/* If reg_equiv_address is not a constant address, copy it,
since it may be shared. */
- rtx address = reg_equiv_address[regno];
+ /* We must rerun eliminate_regs, in case the elimination
+ offsets have changed. */
+ rtx address = XEXP (eliminate_regs (reg_equiv_memory_loc[regno],
+ 0, NULL_RTX),
+ 0);
if (rtx_varies_p (address))
address = copy_rtx (address);
@@ -3880,7 +3884,11 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest)
else if (reg_equiv_address[regno] != 0)
{
/* If reg_equiv_address varies, it may be shared, so copy it. */
- rtx addr = reg_equiv_address[regno];
+ /* We must rerun eliminate_regs, in case the elimination
+ offsets have changed. */
+ rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0,
+ NULL_RTX),
+ 0);
if (rtx_varies_p (addr))
addr = copy_rtx (addr);
@@ -3960,8 +3968,11 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest)
|| ! offsettable_memref_p (reg_equiv_mem[regno])))))
{
int offset = SUBREG_WORD (x) * UNITS_PER_WORD;
- rtx addr = (reg_equiv_address[regno] ? reg_equiv_address[regno]
- : XEXP (reg_equiv_mem[regno], 0));
+ /* We must rerun eliminate_regs, in case the elimination
+ offsets have changed. */
+ rtx addr = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0,
+ NULL_RTX),
+ 0);
if (BYTES_BIG_ENDIAN)
{
int size;
@@ -3998,7 +4009,10 @@ make_memloc (ad, regno)
int regno;
{
register int i;
- rtx tem = reg_equiv_address[regno];
+ /* We must rerun eliminate_regs, in case the elimination
+ offsets have changed. */
+ rtx tem = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, NULL_RTX),
+ 0);
#if 0 /* We cannot safely reuse a memloc made here;
if the pseudo appears twice, and its mem needs a reload,