From: Alan Lehotsky Date: Wed, 10 Jan 2001 02:34:14 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4971426b43884c12761691e9017828512483e7be;p=gcc.git *** empty log message *** From-SVN: r38849 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a8aea60513..dcadbdcc7a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-01-09 Alan Lehotsky + + * reload.c (find_reloads_address): Check for eliminable registers + when substituting a constant expression for a pseudo. + 2001-01-09 Joseph S. Myers * c-common.c (enum format_type): Add format_type_error. 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; }