Commit 339e6723 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87200 (ICE in set_ssa_val_to, at tree-ssa-sccvn.c:3629)

2018-09-03  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/87200
	* tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
	simplify result.

	* gcc.dg/torture/pr87200.c: New testcase.

From-SVN: r264062
parent 7efe0dd0
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87200
* tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
simplify result.
2018-09-03 Martin Liska <mliska@suse.cz>
PR tree-optimization/87201
......
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87200
* gcc.dg/torture/pr87200.c: New testcase.
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87197
* gcc.dg/torture/pr87197.c: New testcase.
......
/* { dg-do compile } */
unsigned long long int ry;
int
gl (void)
{
long long int my = 0;
unsigned long long int *oi = (unsigned long long int *) &my;
int s9;
s9 = !!gl () ? ry : 0;
if (s9 != 0)
oi = &ry;
else
{
my = ry;
*oi += my;
}
return *oi;
}
......@@ -1759,8 +1759,13 @@ vn_nary_build_or_lookup_1 (gimple_match_op *res_op, bool insert)
gimple *new_stmt = NULL;
if (res
&& gimple_simplified_result_is_gimple_val (res_op))
/* The expression is already available. */
result = res_op->ops[0];
{
/* The expression is already available. */
result = res_op->ops[0];
/* Valueize it, simplification returns sth in AVAIL only. */
if (TREE_CODE (result) == SSA_NAME)
result = SSA_VAL (result);
}
else
{
tree val = vn_lookup_simplify_result (res_op);
......
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