+2017-01-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79245
+ * tree-loop-distribution.c (distribute_loop): Apply cost
+ modeling also to detected patterns.
+
2017-01-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/71433
+2017-01-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79245
+ * gcc.dg/tree-ssa/ldist-23.c: XFAIL.
+ * gcc.dg/tree-ssa/ldist-25.c: New testcase.
+
2017-01-27 Jakub Jelinek <jakub@redhat.com>
PR c/79199
return 0;
}
-/* { dg-final { scan-tree-dump "split to 1 loops and 1 library call" "ldist" } } */
-/* { dg-final { scan-tree-dump "generated memcpy" "ldist" } } */
+/* XFAILed due to the fix for PR79245. */
+/* { dg-final { scan-tree-dump "split to 1 loops and 1 library call" "ldist" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump "generated memcpy" "ldist" { xfail *-*-* } } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
+
+#define k 1335
+double a[k][k];
+double b[k][k];
+double c[k][k];
+
+int x;
+int y;
+
+void
+foo (void)
+{
+ for (int j = 0; j < x; j++)
+ {
+ for (int i = 0; i < y; i++)
+ {
+ c[j][i] = b[j][i] - a[j][i];
+ a[j][i] = b[j][i];
+ }
+ }
+}
+
+/* { dg-final { scan-tree-dump "Loop . is the same" "ldist" } } */
for (int j = i + 1;
partitions.iterate (j, &partition); ++j)
{
- if (!partition_builtin_p (partition)
- && similar_memory_accesses (rdg, into, partition))
+ if (similar_memory_accesses (rdg, into, partition))
{
if (dump_file && (dump_flags & TDF_DETAILS))
{