tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider all immediate uses in...
authorKazu Hirata <kazu@cs.umass.edu>
Thu, 7 Apr 2005 16:31:07 +0000 (16:31 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 7 Apr 2005 16:31:07 +0000 (16:31 +0000)
* tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider
all immediate uses in PHI nodes.

From-SVN: r97788

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

index f2591678a32059f3500efb9b65978434ff25cd1a..82368e1d9a3b0b023006b388413292ffb1d958a2 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-07  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider
+       all immediate uses in PHI nodes.
+
 2005-04-07  Richard Earnshaw  <richard.earnshaw@arm.com>
 
        * arm.c (arm_const_double_inline_cost): Handle any constant by
index cecbae7a74f27b0c2b0a04734c560dad87eb4c95..54f9fb961dd145e57aa99bafe3191ada0d583f29 100644 (file)
@@ -241,17 +241,15 @@ nearest_common_dominator_of_uses (tree stmt)
          if (TREE_CODE (usestmt) == PHI_NODE)
            {
              int idx = PHI_ARG_INDEX_FROM_USE (use_p);
-             if (PHI_ARG_DEF (usestmt, idx) == var)
+
+             useblock = PHI_ARG_EDGE (usestmt, idx)->src;
+             /* Short circuit. Nothing dominates the entry block.  */
+             if (useblock == ENTRY_BLOCK_PTR)
                {
-                 useblock = PHI_ARG_EDGE (usestmt, idx)->src;
-                 /* Short circuit. Nothing dominates the entry block.  */
-                 if (useblock == ENTRY_BLOCK_PTR)
-                   {
-                     BITMAP_FREE (blocks);
-                     return NULL;
-                   }
-                 bitmap_set_bit (blocks, useblock->index);
+                 BITMAP_FREE (blocks);
+                 return NULL;
                }
+             bitmap_set_bit (blocks, useblock->index);
            }
          else
            {