tree-ssa-alias.c (indirect_ref_may_alias_decl_p, [...]): Revert accidental commits.
authorJan Hubicka <hubicka@ucw.cz>
Sun, 16 Jun 2019 20:22:59 +0000 (22:22 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 16 Jun 2019 20:22:59 +0000 (20:22 +0000)
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p,
indirect_refs_may_alias_p): Revert accidental commits.

From-SVN: r272358

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

index 05c18aa6479528f5fc34a87b3ca193437cfef250..f75d8d04d36471df1dfd6c8622f561892d3d7168 100644 (file)
@@ -1,5 +1,8 @@
 2019-06-16  Jan Hubicka  <hubicka@ucw.cz>
 
+       * tree-ssa-alias.c (indirect_ref_may_alias_decl_p,
+       indirect_refs_may_alias_p): Revert accidental commits.
+
        * tree-ssa-alias.c (aliasing_component_refs_p): Watch for arrays
        at the end of structures.
 
index 52f9270c6045c9646833349f2e6f18376e79ddf2..b9cdc854249533a1ced9f257f2d22958fb5342ab 100644 (file)
@@ -1532,9 +1532,8 @@ indirect_ref_may_alias_decl_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
       && same_type_for_tbaa (TREE_TYPE (base1), TREE_TYPE (dbase2)) == 1
       && (TREE_CODE (TREE_TYPE (base1)) != ARRAY_TYPE
          || (TYPE_SIZE (TREE_TYPE (base1))
-             && TREE_CODE (TYPE_SIZE (TREE_TYPE (base1))) == INTEGER_CST))
-      && !ranges_maybe_overlap_p (doffset1, max_size1, doffset2, max_size2))
-    return false;
+             && TREE_CODE (TYPE_SIZE (TREE_TYPE (base1))) == INTEGER_CST)))
+    return ranges_maybe_overlap_p (doffset1, max_size1, doffset2, max_size2);
 
   if (ref1 && ref2
       && nonoverlapping_component_refs_p (ref1, ref2))
@@ -1614,9 +1613,8 @@ indirect_refs_may_alias_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
     {
       poly_offset_int moff1 = mem_ref_offset (base1) << LOG2_BITS_PER_UNIT;
       poly_offset_int moff2 = mem_ref_offset (base2) << LOG2_BITS_PER_UNIT;
-      if (!ranges_maybe_overlap_p (offset1 + moff1, max_size1,
-                                  offset2 + moff2, max_size2))
-       return false;
+      return ranges_maybe_overlap_p (offset1 + moff1, max_size1,
+                                    offset2 + moff2, max_size2);
     }
   if (!ptr_derefs_may_alias_p (ptr1, ptr2))
     return false;
@@ -1655,9 +1653,8 @@ indirect_refs_may_alias_p (tree ref1 ATTRIBUTE_UNUSED, tree base1,
       /* But avoid treating arrays as "objects", instead assume they
          can overlap by an exact multiple of their element size.
          See gcc.dg/torture/alias-2.c.  */
-      && TREE_CODE (TREE_TYPE (ptrtype1)) != ARRAY_TYPE
-      && !ranges_maybe_overlap_p (offset1, max_size1, offset2, max_size2))
-    return false;
+      && TREE_CODE (TREE_TYPE (ptrtype1)) != ARRAY_TYPE)
+    return ranges_maybe_overlap_p (offset1, max_size1, offset2, max_size2);
 
   if (ref1 && ref2
       && nonoverlapping_component_refs_p (ref1, ref2))