OSDN Git Service

2011-09-09 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Sep 2011 12:31:33 +0000 (12:31 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Sep 2011 12:31:33 +0000 (12:31 +0000)
* tree-ssa-pre.c (create_expression_by_pieces): Fold the
last statement.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178727 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 8a7e54a..02b99c7 100644 (file)
@@ -1,5 +1,10 @@
 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
        instead of a statement.
        * gimple-fold.c (fold_stmt_inplace): Likewise.
index f69aec0..bee6ef5 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