diff options
author | Alan Lehotsky <lehotsky@tiac.net> | 2001-01-10 02:34:14 +0000 |
---|---|---|
committer | Alan Lehotsky <alehotsky@gcc.gnu.org> | 2001-01-09 21:34:14 -0500 |
commit | 4971426b43884c12761691e9017828512483e7be (patch) | |
tree | a7d4908b19444ce690db058c95b6b1ac87e5b736 /gcc/reload.c | |
parent | fa44a93614f595ad511c5e1540bf83bbfbbb52b1 (diff) | |
download | gcc-4971426b43884c12761691e9017828512483e7be.tar.gz |
*** empty log message ***
From-SVN: r38849
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 11e33f05fc8..533c28c9249 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -4487,10 +4487,14 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels, insn) { regno = REGNO (ad); - if (reg_equiv_constant[regno] != 0 - && strict_memory_address_p (mode, reg_equiv_constant[regno])) + /* If the register is equivalent to an invariant expression, substitute + the invariant, and eliminate any eliminable register references. */ + tem = reg_equiv_constant[regno]; + if (tem != 0 + && (tem = eliminate_regs (tem, mode, insn)) + && strict_memory_address_p (mode, tem)) { - *loc = ad = reg_equiv_constant[regno]; + *loc = ad = tem; return 0; } |