tree-ssa-pre.c (create_expression_by_pieces): Fold the last statement.
authorRichard Guenther <rguenther@suse.de>
Fri, 9 Sep 2011 12:31:33 +0000 (12:31 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 9 Sep 2011 12:31:33 +0000 (12:31 +0000)
2011-09-09  Richard Guenther  <rguenther@suse.de>

* tree-ssa-pre.c (create_expression_by_pieces): Fold the
last statement.

From-SVN: r178727

gcc/ChangeLog
gcc/tree-ssa-pre.c

index 8a7e54a3b1cf94ab9807d2949a9e28eb4275ab18..02b99c7c0f6554b638195e735c7df2c8b2b89006 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-09  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-pre.c (create_expression_by_pieces): Fold the
+       last statement.
+
 2011-09-09  Richard Guenther  <rguenther@suse.de>
 
        * gimple.h (fold_stmt_inplace): Adjust to take a gimple_stmt_iterator
index f69aec0dd4d06c4e4db8ee45b8873a44b23cad6a..bee6ef52c6ced0c927afc7d863390104125d618a 100644 (file)
@@ -3182,6 +3182,10 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
   /* All the symbols in NEWEXPR should be put into SSA form.  */
   mark_symbols_for_renaming (newstmt);
 
+  /* Fold the last statement.  */
+  gsi = gsi_last (*stmts);
+  fold_stmt_inplace (&gsi);
+
   /* Add a value number to the temporary.
      The value may already exist in either NEW_SETS, or AVAIL_OUT, because
      we are creating the expression by pieces, and this particular piece of