From ff7340933e1cec8ea5cc733eab6dbd88c7d5a840 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 27 Nov 2014 10:00:15 +0000 Subject: [PATCH] tree-ssa-sccvn.c (try_to_simplify): Allow gimple_fold_stmt_to_constant_1 to follow SSA edges. 2014-11-27 Richard Biener * tree-ssa-sccvn.c (try_to_simplify): Allow gimple_fold_stmt_to_constant_1 to follow SSA edges. From-SVN: r218116 --- gcc/ChangeLog | 5 +++++ gcc/tree-ssa-sccvn.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71828c2..2b4eec7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2014-11-27 Richard Biener + * tree-ssa-sccvn.c (try_to_simplify): Allow + gimple_fold_stmt_to_constant_1 to follow SSA edges. + +2014-11-27 Richard Biener + PR tree-optimization/64083 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not forcibly mark loop for removal the wrong way. diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 8b3f2c7..7f69415 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -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))) -- 2.7.4