*** empty log message ***
authorAlan Lehotsky <lehotsky@tiac.net>
Wed, 10 Jan 2001 02:34:14 +0000 (02:34 +0000)
committerAlan Lehotsky <alehotsky@gcc.gnu.org>
Wed, 10 Jan 2001 02:34:14 +0000 (21:34 -0500)
From-SVN: r38849

gcc/ChangeLog
gcc/reload.c

index 3a8aea6051384885c187cbae455fb599d1b3e91a..dcadbdcc7a5684131ffa2bc22c419ff02c38a259 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-09  Alan Lehotsky  <lehotsky@tiac.net>
+
+       * reload.c (find_reloads_address): Check for eliminable registers
+                 when substituting a constant expression for a pseudo.
+       
 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * c-common.c (enum format_type): Add format_type_error.
index 11e33f05fc869d8c3d6017070b2696b49a40660d..533c28c92491b6b8cd881843b3a991e9561c4a23 100644 (file)
@@ -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;
        }