From: alehotsky Date: Wed, 10 Jan 2001 02:34:14 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: upstream/4.9.2~96690 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48957ec9ac40fa69fb0b44e774c5845e48fa032f;p=platform%2Fupstream%2Flinaro-gcc.git *** empty log message *** git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38849 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a8aea6..dcadbdc 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 11e33f0..533c28c9 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; }