diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-07 16:31:07 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-07 16:31:07 +0000 |
commit | c48d3403e29d1867251679626537464f4ebf882c (patch) | |
tree | 7f14b7ad7a73fa4e594bbd96a9a021e5eab1e780 /gcc/tree-ssa-sink.c | |
parent | fbfdcb7b5d2ca7dc5bd626fc8b3a838fd7d5e34c (diff) | |
download | gcc-c48d3403e29d1867251679626537464f4ebf882c.tar.gz |
* tree-ssa-sink.c (nearest_common_dominator_of_uses): Consider
all immediate uses in PHI nodes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97788 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r-- | gcc/tree-ssa-sink.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index cecbae7a74f..54f9fb961dd 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -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 { |