]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert "tree-optimization/112281 - loop distribution and zero dependence distances"
authorRichard Biener <rguenther@suse.de>
Fri, 17 Nov 2023 13:47:07 +0000 (14:47 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 17 Nov 2023 13:48:36 +0000 (14:48 +0100)
This reverts commit 5ea2965b499f9e491e45db19fedbccfccb75076a.

gcc/testsuite/gcc.dg/torture/pr112281.c [deleted file]
gcc/tree-loop-distribution.cc

diff --git a/gcc/testsuite/gcc.dg/torture/pr112281.c b/gcc/testsuite/gcc.dg/torture/pr112281.c
deleted file mode 100644 (file)
index 3f0a61a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* { dg-do run } */
-/* { dg-additional-options "-ftree-loop-distribution" } */
-
-struct {
-  int : 8;
-  int a;
-} b, d[4] = {{0}, {0}, {0}, {5}};
-int c, e;
-int main()
-{
-  for (c = 2; c; c--)
-    for (e = 0; e < 2; e++) {
-      d[c] = b = d[c + 1];
-      d[c + 1].a = 0;
-    }
-  if (b.a != 0)
-    __builtin_abort();
-  return 0;
-}
index 5ededd97c3d693ac5862d325a195ac173904a4b3..ffca535064bee1c080c13285ae96463f9951c7f5 100644 (file)
@@ -2163,10 +2163,9 @@ loop_distribution::pg_add_dependence_edges (struct graph *rdg, int dir,
                 gcc.dg/tree-ssa/pr94969.c.  */
              if (DDR_NUM_DIST_VECTS (ddr) != 1)
                this_dir = 2;
-             /* If the dependence distance is zero in the innermost
-                loop preserve stmt order.  */
-             else if (DDR_DIST_VECT (ddr, 0)
-                        [DDR_LOOP_NEST (ddr).length () - 1] == 0)
+             /* If the overlap is exact preserve stmt order.  */
+             else if (lambda_vector_zerop (DDR_DIST_VECT (ddr, 0),
+                                           DDR_NB_LOOPS (ddr)))
                ;
              /* Else as the distance vector is lexicographic positive swap
                 the dependence direction.  */