]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reload1.c (reload): Ignore MEM REG_EQUIV notes if the equivalent is not a valid memor...
authorUlrich Weigand <uweigand@de.ibm.com>
Tue, 12 Mar 2002 21:02:24 +0000 (21:02 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Tue, 12 Mar 2002 21:02:24 +0000 (21:02 +0000)
* reload1.c (reload): Ignore MEM REG_EQUIV notes if the equivalent
is not a valid memory_operand.

From-SVN: r50681

gcc/ChangeLog
gcc/reload1.c

index 87e5ca1afcfe0601bca179c441dc4abd42e84156..5f02f1535830389d4c1d1cb0b1417a86fdf93e9d 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-12  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * reload1.c (reload): Ignore MEM REG_EQUIV notes if the equivalent
+       is not a valid memory_operand.
+
 2002-03-12  Bob Wilson  <bob.wilson@acm.org>
 
        * config/xtensa/xtensa-config.h: Define XCHAL_HAVE_LOOPS.
index a3519efe3c40b18ea1867d892d10f0b1dfa6d88f..fce489da0d0250b36c2023f1f543abc0ac94ded6 100644 (file)
@@ -790,7 +790,12 @@ reload (first, global)
              i = REGNO (SET_DEST (set));
              if (i > LAST_VIRTUAL_REGISTER)
                {
-                 if (GET_CODE (x) == MEM)
+                 /* It can happen that a REG_EQUIV note contains a MEM
+                    that is not a legitimate memory operand.  As later
+                    stages of reload assume that all addresses found
+                    in the reg_equiv_* arrays were originally legitimate,
+                    we ignore such REG_EQUIV notes.  */
+                 if (memory_operand (x, VOIDmode))
                    {
                      /* Always unshare the equivalence, so we can
                         substitute into this insn without touching the