aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-04-21 12:38:32 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-04-21 12:38:32 +0000
commit9588d24871d34967389a1396e3df16c61eacd54c (patch)
treec2bdad945d0e54ea48a86ebacccd55bac5913632 /gcc
parent908c55f1612aff989f56d4ab0d7793fe5a84608d (diff)
downloadgcc-9588d24871d34967389a1396e3df16c61eacd54c.zip
gcc-9588d24871d34967389a1396e3df16c61eacd54c.tar.gz
gcc-9588d24871d34967389a1396e3df16c61eacd54c.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-ccp.c27
2 files changed, 17 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 791db04..19b0ed4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
vec_construct cost by vec_stmt_cost.
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 79f6afb..47fbf7f 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1756,6 +1756,14 @@ evaluate_stmt (gimple stmt)
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. */
if (flag_tree_bit_ccp
@@ -1890,7 +1898,7 @@ evaluate_stmt (gimple stmt)
if (flag_tree_bit_ccp
&& ((is_constant && TREE_CODE (val.value) == INTEGER_CST)
- || (!is_constant && likelyvalue != UNDEFINED))
+ || !is_constant)
&& gimple_get_lhs (stmt)
&& TREE_CODE (gimple_get_lhs (stmt)) == SSA_NAME)
{
@@ -1918,22 +1926,11 @@ evaluate_stmt (gimple stmt)
}
}
+ /* The statement produced a nonconstant value. */
if (!is_constant)
{
- /* The statement produced a nonconstant value. If the statement
- had UNDEFINED operands, then the result of the statement
- 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.lattice_val = VARYING;
+ val.mask = -1;
val.value = NULL_TREE;
}