+2012-04-11 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/52881
+ * ifcvt.c (find_if_case_2): Avoid speculating loop latches.
+
2012-04-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52912
edge else_succ;
int then_prob, else_prob;
+ /* We do not want to speculate (empty) loop latches. */
+ if (current_loops
+ && else_bb->loop_father->latch == else_bb)
+ return FALSE;
+
/* If we are partitioning hot/cold basic blocks, we don't want to
mess up unconditional or indirect jumps that cross between hot
and cold sections.
+2012-04-11 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/52881
+ * gcc.dg/torture/pr52881.c: New testcase.
+ * gcc.dg/torture/pr52913.c: Likewise.
+
2012-04-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52912
--- /dev/null
+/* { dg-do compile } */
+
+int a, b, c, d, e, f, h, i, j, k, l, m, n, o;
+static int g;
+int
+fn1 () {
+ for (;; ++f)
+ if (e)
+ break;
+ return 0;
+}
+unsigned char fn2 ();
+void
+fn3 () {
+lbl_220:
+ if (j) {
+lbl_221:
+ l = (g || b) <= fn1 ();
+ for (;;) {
+ g = 0;
+ fn2 ();
+ if (k)
+ goto lbl_220;
+ break;
+ }
+ if (l)
+ goto lbl_221;
+ }
+}
+unsigned char
+fn2 () {
+ o = d ? 0 : c;
+ h = m | a % o != n;
+ return i;
+}
--- /dev/null
+/* { dg-do compile } */
+
+int a, b, c, d, e;
+void
+fn1 ()
+{
+lbl_101:
+ e = 0;
+lbl_274:
+ for (c = 0; c < 1; c = a)
+ if (d)
+ if (b)
+ goto lbl_101;
+ else
+ break;
+ d = 1;
+ goto lbl_274;
+}