diff mbox

Fix match-and-simplify regression

Message ID alpine.LSU.2.11.1411271052150.374@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Nov. 27, 2014, 9:53 a.m. UTC
The following allows gimple_fold_stmt_to_constant_1 in SCCVN to follow
SSA edges.  This fixes regressions caused by no longer dispatching to
fold_unary from it.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

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.
diff mbox

Patch

Index: gcc/tree-ssa-sccvn.c
===================================================================
--- gcc/tree-ssa-sccvn.c	(revision 218114)
+++ gcc/tree-ssa-sccvn.c	(working copy)
@@ -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)))