tree-ssa-sccvn.c (try_to_simplify): Allow gimple_fold_stmt_to_constant_1 to follow SSA edges.

2014-11-27  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (try_to_simplify): Allow
	gimple_fold_stmt_to_constant_1 to follow SSA edges.

From-SVN: r218116
This commit is contained in:
Richard Biener 2014-11-27 10:00:15 +00:00 committed by Richard Biener
parent e311c2d89a
commit ff7340933e
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-11-27 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (try_to_simplify): Allow
gimple_fold_stmt_to_constant_1 to follow SSA edges.
2014-11-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/64083

View File

@ -3461,7 +3461,7 @@ try_to_simplify (gassign *stmt)
return NULL_TREE;
/* First try constant folding based on our current lattice. */
tem = gimple_fold_stmt_to_constant_1 (stmt, vn_valueize);
tem = gimple_fold_stmt_to_constant_1 (stmt, vn_valueize, vn_valueize);
if (tem
&& (TREE_CODE (tem) == SSA_NAME
|| is_gimple_min_invariant (tem)))