]> gcc.gnu.org Git - gcc.git/commitdiff
re PR middle-end/42509 (nonoverlapping_memrefs_p misinterprets NULL MEM_OFFSET as...
authorRichard Guenther <rguenther@suse.de>
Sat, 3 Apr 2010 17:14:44 +0000 (17:14 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 3 Apr 2010 17:14:44 +0000 (17:14 +0000)
2010-04-03  Richard Guenther  <rguenther@suse.de>

PR middle-end/42509
* alias.c (nonoverlapping_memrefs_p): For spill-slot accesses
require a non-NULL MEM_OFFSET.

From-SVN: r157954

gcc/ChangeLog
gcc/alias.c

index e06d38c2f25651fbed799a193bdccfe6b817227e..2eb77c4f8b8d2cf83f5dccc6ea662f71fc6faee4 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-03  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/42509
+       * alias.c (nonoverlapping_memrefs_p): For spill-slot accesses
+       require a non-NULL MEM_OFFSET.
+
 2010-04-02  Steven Bosscher  <steven@gcc.gnu.org>
 
        * ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, 
index 317aeba5503803ec685cbdd58249ae895812aa53..cd7e2a06bdbb803215737d0576ca7507ff269cc4 100644 (file)
@@ -2147,6 +2147,13 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y)
   if (exprx == 0 || expry == 0)
     return 0;
 
+  /* For spill-slot accesses make sure we have valid offsets.  */
+  if ((exprx == get_spill_slot_decl (false)
+       && ! MEM_OFFSET (x))
+      || (expry == get_spill_slot_decl (false)
+         && ! MEM_OFFSET (y)))
+    return 0;
+
   /* If both are field references, we may be able to determine something.  */
   if (TREE_CODE (exprx) == COMPONENT_REF
       && TREE_CODE (expry) == COMPONENT_REF
This page took 0.063102 seconds and 5 git commands to generate.