+2016-07-20 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/71503
+ PR tree-optimization/71683
+ * tree-if-conv.c (gen_phi_arg_condition): Record true predicate
+ and break.
+
2016-07-20 Martin Liska <mliska@suse.cz>
* doc/invoke.texi (-fipa-ra): Document when the option is
+2016-07-20 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/71503
+ PR tree-optimization/71683
+ * gcc.dg/tree-ssa/ifc-pr71503.c: New test.
+ * gcc.dg/tree-ssa/ifc-pr71683.c: New test.
+
2016-07-20 Martin Liska <mliska@suse.cz>
* gcc.dg/plugin/plugin.exp: Remove sreal test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Ofast" { target *-*-* } } */
+
+int a, b;
+unsigned long d;
+void fn1() {
+ unsigned long *h = &d;
+line1 : {
+ int i = 4;
+ for (; b; i++) {
+ d = ((d + 6 ?: *h) ? a : 7) && (i &= 0 >= b);
+ b += a;
+ }
+}
+ h = 0;
+ for (; *h;)
+ goto line1;
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Ofast" { target *-*-* } } */
+
+short unsigned int ve;
+
+void
+u1 (void)
+{
+ int oq = 0;
+
+ while (ve != 0)
+ {
+ int j4, w7 = oq;
+
+ oq = 0 / oq;
+ ve %= oq;
+ j4 = ve ^ 1;
+ ve ^= oq;
+ if (j4 != 0 ? j4 : ve)
+ oq = ve;
+ else
+ if (w7 != 0)
+ oq = ve;
+ }
+}
e = gimple_phi_arg_edge (phi, (*occur)[i]);
c = bb_predicate (e->src);
if (is_true_predicate (c))
- continue;
+ {
+ cond = c;
+ break;
+ }
c = force_gimple_operand_gsi_1 (gsi, unshare_expr (c),
is_gimple_condexpr, NULL_TREE,
true, GSI_SAME_STMT);