2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* tree-ssa-pre.c (compute_avail): Do not make expressions
with predicated values available.
(get_expr_value_id): Assert we do not run into predicated value
expressions.
* gcc.dg/pr87117-2.c: New testcase.
From-SVN: r263910
+2018-08-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87117
+ * tree-ssa-pre.c (compute_avail): Do not make expressions
+ with predicated values available.
+ (get_expr_value_id): Assert we do not run into predicated value
+ expressions.
+
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
+2018-08-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87117
+ * gcc.dg/pr87117-2.c: New testcase.
+
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -fcode-hoisting" } */
+
+void e();
+
+void a(int c, char **d)
+{
+ char b;
+ if (1 < c)
+ b = (char)(__INTPTR_TYPE__)d[0];
+ if (1 < c && b)
+ e();
+ while (1 < c)
+ ;
+}
id = VN_INFO (PRE_EXPR_NAME (expr))->value_id;
break;
case NARY:
+ gcc_assert (!PRE_EXPR_NARY (expr)->predicated_values);
id = PRE_EXPR_NARY (expr)->value_id;
break;
case REFERENCE:
continue;
vn_nary_op_lookup_stmt (stmt, &nary);
- if (!nary)
+ if (!nary || nary->predicated_values)
continue;
/* If the NARY traps and there was a preceding