+2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
+
+ PR tree-optimization/87022
+ * tree-loop-distribution.c (pg_add_dependence_edges): Check all
+ bits in dist vector rather than the first one.
+
2018-10-15 Richard Biener <rguenther@suse.de>
PR middle-end/87610
+2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
+
+ PR tree-optimization/87022
+ * gcc.dg/tree-ssa/pr87022.c: New test.
+
2018-10-15 Richard Biener <rguenther@suse.de>
PR middle-end/87610
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+void abort();
+char a[7];
+char b[10][7];
+char r[10][7] = { {0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0},
+ {0,0,1,1,1,1,1},
+ {0,0,1,1,1,1,1},
+ {0,0,1,1,1,1,1}};
+short c;
+int d, e, f, g;
+int main() {
+ for (; d <= 4; d++) {
+ e = 0;
+ for (; e <= 6; e++) {
+ if (a[c])
+ b[e + 3][d + 2] = 1;
+ a[0] = 5;
+ b[e][d + 2] = 0;
+ }
+ }
+ for (; f < 10; f++) {
+ g = 0;
+ for (; g < 7; g++)
+ if (b[f][g] != r[f][g])
+ abort ();
+ }
+ return 0;
+}
if (DDR_NUM_DIST_VECTS (ddr) != 1)
this_dir = 2;
/* If the overlap is exact preserve stmt order. */
- else if (lambda_vector_zerop (DDR_DIST_VECT (ddr, 0), 1))
+ 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. */