OSDN Git Service

2010-05-14 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 May 2010 20:18:34 +0000 (20:18 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:08:36 +0000 (14:08 +0900)
PR tree-optimization/44119
* tree-ssa-pre.c (eliminate): Properly mark replacement of
a PHI node necessary.

* gcc.c-torture/compile/pr44119.c: New testcase.

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

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

index bd83bf8..a0df089 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-14  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/44119
+       * tree-ssa-pre.c (eliminate): Properly mark replacement of
+       a PHI node necessary.
+
 2010-05-14  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree.h (TREE_ADDRESSABLE): Remove bogus usage for FIELD_DECL.
index 331b142..b96b9a3 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-14  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/44119
+       * gcc.c-torture/compile/pr44119.c: New testcase.
+
 2010-05-14  Jason Merrill  <jason@redhat.com>
 
        PR c++/44127
index ac676cd..816aeb6 100644 (file)
@@ -4347,6 +4347,10 @@ eliminate (void)
 
          remove_phi_node (&gsi, false);
 
+         if (!bitmap_bit_p (inserted_exprs, SSA_NAME_VERSION (res))
+             && TREE_CODE (sprime) == SSA_NAME)
+           gimple_set_plf (SSA_NAME_DEF_STMT (sprime), NECESSARY, true);
+
          if (!useless_type_conversion_p (TREE_TYPE (res), TREE_TYPE (sprime)))
            sprime = fold_convert (TREE_TYPE (res), sprime);
          stmt = gimple_build_assign (res, sprime);