PR tree-optimization/78384
* tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
testsuite/
PR tree-optimization/78384
* gcc.dg/pr78384.c: New test.
From-SVN: r244811
+2017-01-23 Michael Matz <matz@suse.de>
+
+ PR tree-optimization/78384
+ * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
+
2017-01-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79186
+2017-01-23 Michael Matz <matz@suse.de>
+
+ PR tree-optimization/78384
+ * gcc.dg/pr78384.c: New test.
+
2017-01-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/79186
--- /dev/null
+/* PR tree-optimization/78384
+ { dg-do compile }
+ { dg-options "-O3 -w -fsplit-loops" } */
+void
+a2 (int wv, int yg, int r9)
+{
+ while (wv < 1)
+ {
+ int vn = r9 % 0;
+
+ while (yg < 1)
+ {
+ int lz;
+
+ for (r9 = 0; r9 < 17; ++r9)
+ {
+ }
+
+ it:
+ lz = (yg++ >= 0) ? 2 : 0;
+ wv = vn < lz;
+ }
+ }
+ goto it;
+}
nextval, newbound);
update_stmt (stmt);
- edge stay = single_pred_edge (loop->latch);
+ edge stay = EDGE_SUCC (exit->src, EDGE_SUCC (exit->src, 0) == exit);
exit->flags &= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE);
stay->flags &= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE);