+2019-01-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/86865
+ * graphite-scop-detection.c (scop_detection::can_represent_loop):
+ Reject non-do-while loops.
+
2019-01-24 Peter Bergner <bergner@linux.ibm.com>
* config/rs6000/altivec.md (build_vector_mask_for_load): Use MEM_P.
tree niter;
struct tree_niter_desc niter_desc;
- return single_exit (loop)
- && !(loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP)
+ /* We can only handle do {} while () style loops correctly. */
+ edge exit = single_exit (loop);
+ if (!exit
+ || !single_pred_p (loop->latch)
+ || exit->src != single_pred (loop->latch)
+ || !empty_block_p (loop->latch))
+ return false;
+
+ return !(loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP)
&& number_of_iterations_exit (loop, single_exit (loop), &niter_desc, false)
&& niter_desc.control.no_overflow
&& (niter = number_of_latch_executions (loop))
+2019-01-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/86865
+ * gcc.dg/graphite/pr86865.c: New testcase.
+ * gcc.dg/graphite/pr69728.c: XFAIL.
+ * gcc.dg/graphite/scop-21.c: Likewise.
+
2019-01-24 Martin Sebor <msebor@redhat.com>
PR c/86125
run into scheduling issues before here, not being able to handle
empty domains. */
-/* { dg-final { scan-tree-dump "loop nest optimized" "graphite" } } */
+/* XFAILed by fix for PR86865. */
+
+/* { dg-final { scan-tree-dump "loop nest optimized" "graphite" { xfail *-*-* } } } */
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -fgraphite-identity -fstack-reuse=none -fwrapv -fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-loop-ivcanon" } */
+
+int xy, tb;
+
+void
+bt (void)
+{
+ for (xy = 0; xy >= 0; --xy)
+ {
+ int yt[8] = { 0 };
+ int pz[2] = { 0 };
+ int sa[32] = { 0 };
+ int us;
+
+ for (us = 0; us < 8; ++us)
+ yt[us] = 0;
+
+ (void) yt;
+ (void) pz;
+ (void) sa;
+ }
+
+ tb = 1;
+}
+
+int
+main (void)
+{
+ bt ();
+ if (xy != -1)
+ __builtin_abort ();
+
+ return 0;
+}
return a[20];
}
-/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite"} } */
+/* XFAILed by the fix for PR86865. */
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } } */