Commit 9588d248 by Richard Biener Committed by Richard Biener

re PR middle-end/65788 (416.gamess in SPEC CPU 2006 failed to build)

2015-04-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/65788
	* tree-ssa-ccp.c (evaluate_stmt): Evaluate to UNDEFINED early.

From-SVN: r222266
parent 908c55f1
2015-04-21 Richard Biener <rguenther@suse.de> 2015-04-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/65788
* tree-ssa-ccp.c (evaluate_stmt): Evaluate to UNDEFINED early.
2015-04-21 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (ix86_builtin_vectorization_cost): Scale * config/i386/i386.c (ix86_builtin_vectorization_cost): Scale
vec_construct cost by vec_stmt_cost. vec_construct cost by vec_stmt_cost.
......
...@@ -1756,6 +1756,14 @@ evaluate_stmt (gimple stmt) ...@@ -1756,6 +1756,14 @@ evaluate_stmt (gimple stmt)
val.mask = 0; val.mask = 0;
} }
} }
/* If the statement result is likely UNDEFINED, make it so. */
else if (likelyvalue == UNDEFINED)
{
val.lattice_val = UNDEFINED;
val.value = NULL_TREE;
val.mask = 0;
return val;
}
/* Resort to simplification for bitwise tracking. */ /* Resort to simplification for bitwise tracking. */
if (flag_tree_bit_ccp if (flag_tree_bit_ccp
...@@ -1890,7 +1898,7 @@ evaluate_stmt (gimple stmt) ...@@ -1890,7 +1898,7 @@ evaluate_stmt (gimple stmt)
if (flag_tree_bit_ccp if (flag_tree_bit_ccp
&& ((is_constant && TREE_CODE (val.value) == INTEGER_CST) && ((is_constant && TREE_CODE (val.value) == INTEGER_CST)
|| (!is_constant && likelyvalue != UNDEFINED)) || !is_constant)
&& gimple_get_lhs (stmt) && gimple_get_lhs (stmt)
&& TREE_CODE (gimple_get_lhs (stmt)) == SSA_NAME) && TREE_CODE (gimple_get_lhs (stmt)) == SSA_NAME)
{ {
...@@ -1918,22 +1926,11 @@ evaluate_stmt (gimple stmt) ...@@ -1918,22 +1926,11 @@ evaluate_stmt (gimple stmt)
} }
} }
/* The statement produced a nonconstant value. */
if (!is_constant) if (!is_constant)
{ {
/* The statement produced a nonconstant value. If the statement val.lattice_val = VARYING;
had UNDEFINED operands, then the result of the statement val.mask = -1;
should be UNDEFINED. Otherwise, the statement is VARYING. */
if (likelyvalue == UNDEFINED)
{
val.lattice_val = likelyvalue;
val.mask = 0;
}
else
{
val.lattice_val = VARYING;
val.mask = -1;
}
val.value = NULL_TREE; val.value = NULL_TREE;
} }
......
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