+2017-08-14 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/81799
+ * tree-loop-distribution.c (version_loop_by_alias_check): Force
+ cond_expr to simple gimple operand.
+
2017-08-14 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/46932
+2017-08-14 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/81799
+ * gcc.dg/tree-ssa/pr81799.c: New.
+
2017-08-14 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/46932
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int printf (const char *, ...);
+
+int a, c[1], d, e, **f;
+
+void fn1 (int h)
+{
+ int *i = 0;
+ for (d = 0; d < 1; d++)
+ {
+ if (d)
+ continue;
+ for (; e; e++)
+ {
+ a = c[*i];
+ if (h)
+ printf ("0");
+ }
+ return;
+ }
+ f = &i;
+}
+
compute_alias_check_pairs (loop, alias_ddrs, &comp_alias_pairs);
create_runtime_alias_checks (loop, &comp_alias_pairs, &cond_expr);
cond_expr = force_gimple_operand_1 (cond_expr, &cond_stmts,
- is_gimple_condexpr, NULL_TREE);
+ is_gimple_val, NULL_TREE);
/* Depend on vectorizer to fold IFN_LOOP_DIST_ALIAS. */
if (flag_tree_loop_vectorize)