Commit 7b3ca244 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87117 (ICE in…

re PR tree-optimization/87117 (ICE in eliminate_dom_walker::eliminate_cleanup(bool) at gcc/gcc/tree-ssa-sccvn.c:5431 since r263875)

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
parent 6df46f59
2018-08-28 Richard Biener <rguenther@suse.de> 2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117 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
* tree-ssa-operands.c (add_stmt_operand): STRING_CST may * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
get virtual operands. get virtual operands.
(get_expr_operands): Handle STRING_CST like other decls. (get_expr_operands): Handle STRING_CST like other decls.
......
2018-08-28 Richard Biener <rguenther@suse.de> 2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117 PR tree-optimization/87117
* gcc.dg/pr87117-2.c: New testcase.
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* gcc.dg/lvalue-5.c: New testcase. * gcc.dg/lvalue-5.c: New testcase.
2018-08-27 Jeff Law <law@redhat.com> 2018-08-27 Jeff Law <law@redhat.com>
......
/* { 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)
;
}
...@@ -663,6 +663,7 @@ get_expr_value_id (pre_expr expr) ...@@ -663,6 +663,7 @@ get_expr_value_id (pre_expr expr)
id = VN_INFO (PRE_EXPR_NAME (expr))->value_id; id = VN_INFO (PRE_EXPR_NAME (expr))->value_id;
break; break;
case NARY: case NARY:
gcc_assert (!PRE_EXPR_NARY (expr)->predicated_values);
id = PRE_EXPR_NARY (expr)->value_id; id = PRE_EXPR_NARY (expr)->value_id;
break; break;
case REFERENCE: case REFERENCE:
...@@ -3902,7 +3903,7 @@ compute_avail (void) ...@@ -3902,7 +3903,7 @@ compute_avail (void)
continue; continue;
vn_nary_op_lookup_stmt (stmt, &nary); vn_nary_op_lookup_stmt (stmt, &nary);
if (!nary) if (!nary || nary->predicated_values)
continue; continue;
/* If the NARY traps and there was a preceding /* If the NARY traps and there was a preceding
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment