2010-07-08 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2010 09:09:15 +0000 (09:09 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2010 09:09:15 +0000 (09:09 +0000)
PR rtl-optimization/44838
* tree-ssa-alias.c (indirect_refs_may_alias_p): When not in
SSA form do not use pointer equivalence.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161945 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-alias.c

index e374743..3d619ad 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-08  Richard Guenther  <rguenther@suse.de>
+
+       PR rtl-optimization/44838
+       * tree-ssa-alias.c (indirect_refs_may_alias_p): When not in
+       SSA form do not use pointer equivalence.
+
 2010-07-08  Eric Botcazou  <ebotcazou@adacore.com>
 
        * dwarf2out.c (AT_linkage_name): Delete.
index 78eb362..2460804 100644 (file)
@@ -801,7 +801,8 @@ indirect_refs_may_alias_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
   /* If both bases are based on pointers they cannot alias if they may not
      point to the same memory object or if they point to the same object
      and the accesses do not overlap.  */
-  if (operand_equal_p (ptr1, ptr2, 0))
+  if ((!cfun || gimple_in_ssa_p (cfun))
+      && operand_equal_p (ptr1, ptr2, 0))
     {
       if (TREE_CODE (base1) == MEM_REF)
        offset1 += mem_ref_offset (base1).low * BITS_PER_UNIT;