]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially committed change.
authorRichard Biener <rguenther@suse.de>
Wed, 20 Jun 2018 13:16:58 +0000 (13:16 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 20 Jun 2018 13:16:58 +0000 (13:16 +0000)
2018-06-20  Richard Biener  <rguenther@suse.de>

* tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially
committed change.

From-SVN: r261801

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

index 14bcf30b2029ebfba81a239b206742764f7d1556..0da795e96588ca9dce2386d04e88305fface063a 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-20  Richard Biener  <rguenther@suse.de>
+
+       * tree-ssa-alias.c (stmt_kills_ref_p): Revert accidentially
+       committed change.
+
 2018-06-20  Richard Biener  <rguenther@suse.de>
 
        Backport from mainline
index 3f0011f3d100f9488393144a4b93de635a79c171..08f10e5248b568f7252d4b54868bd22ab7767d12 100644 (file)
@@ -2235,7 +2235,6 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref)
       if (ref->ref)
        {
          tree base = ref->ref;
-         tree innermost_dropped_array_ref = NULL_TREE;
          if (handled_component_p (base))
            {
              tree saved_lhs0 = NULL_TREE;
@@ -2255,11 +2254,6 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref)
                  TREE_OPERAND (base, 0) = saved_base0;
                  if (res)
                    break;
-                 /* Remember if we drop an array-ref that we need to
-                    double-check not being at struct end.  */ 
-                 if (TREE_CODE (base) == ARRAY_REF
-                     || TREE_CODE (base) == ARRAY_RANGE_REF)
-                   innermost_dropped_array_ref = base;
                  /* Otherwise drop handled components of the access.  */
                  base = saved_base0;
                }
@@ -2268,22 +2262,15 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref)
                TREE_OPERAND (lhs, 0) = saved_lhs0;
            }
          /* Finally check if the lhs has the same address and size as the
-            base candidate of the access.  Watch out if we have dropped
-            an array-ref that was at struct end, this means ref->ref may
-            be outside of the TYPE_SIZE of its base.  */
-         if ((! innermost_dropped_array_ref
-              || ! array_at_struct_end_p (innermost_dropped_array_ref))
-             && (lhs == base
-                 || (((TYPE_SIZE (TREE_TYPE (lhs))
-                       == TYPE_SIZE (TREE_TYPE (base)))
-                      || (TYPE_SIZE (TREE_TYPE (lhs))
-                          && TYPE_SIZE (TREE_TYPE (base))
-                          && operand_equal_p (TYPE_SIZE (TREE_TYPE (lhs)),
-                                              TYPE_SIZE (TREE_TYPE (base)),
-                                              0)))
-                     && operand_equal_p (lhs, base,
-                                         OEP_ADDRESS_OF
-                                         | OEP_MATCH_SIDE_EFFECTS))))
+            base candidate of the access.  */
+         if (lhs == base
+             || (((TYPE_SIZE (TREE_TYPE (lhs))
+                   == TYPE_SIZE (TREE_TYPE (base)))
+                  || (TYPE_SIZE (TREE_TYPE (lhs))
+                      && TYPE_SIZE (TREE_TYPE (base))
+                      && operand_equal_p (TYPE_SIZE (TREE_TYPE (lhs)),
+                                          TYPE_SIZE (TREE_TYPE (base)), 0)))
+                 && operand_equal_p (lhs, base, OEP_ADDRESS_OF)))
            return true;
        }