+2014-12-01 Yuri Rumyantsev <ysrumyan@gmail.com>
+
+ PR tree-optimization/63941
+ * tree-if-conv.c (add_to_predicate_list): Delete wrong assertion that
+ DOM_BB has non-true predicate, conditionally set non-true predicate
+ for BB.
+
2014-12-01 Martin Jambor <mjambor@suse.cz>
PR ipa/63551
+2014-12-01 Yuri Rumyantsev <ysrumyan@gmail.com>
+
+ PR tree-optimization/63941
+ * gcc.dg/torture/pr63941.c: New test.
+
2014-12-01 Martin Jambor <mjambor@suse.cz>
PR ipa/63551
--- /dev/null
+/* { dg-do compile } */
+
+int a, b, c, d[1], e, f, g, h;
+
+void
+fn1 ()
+{
+ char i = 0;
+ for (b = 0; b >= 0;)
+ for (b = 0; b < 2; b++)
+ {
+ d[f] && (e = 0);
+ h = 1 & a - i ? 0 : a;
+ c = i = h;
+ char j = c;
+ int k = 0;
+ g = j || j > k;
+ d[0] = 0;
+ }
+}
{
gcc_assert (flow_bb_inside_loop_p (loop, dom_bb));
bc = bb_predicate (dom_bb);
- gcc_assert (!is_true_predicate (bc));
- set_bb_predicate (bb, bc);
+ if (!is_true_predicate (bc))
+ set_bb_predicate (bb, bc);
+ else
+ gcc_assert (is_true_predicate (bb_predicate (bb)));
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Use predicate of bb#%d for bb#%d\n",
dom_bb->index, bb->index);