diff options
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r-- | gcc/tree-ssa-sink.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 7751c4a..8041686 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -238,31 +238,25 @@ nearest_common_dominator_of_uses (tree stmt) { tree usestmt = USE_STMT (use_p); basic_block useblock; + if (TREE_CODE (usestmt) == PHI_NODE) { int idx = PHI_ARG_INDEX_FROM_USE (use_p); 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); } else { useblock = bb_for_stmt (usestmt); + } - /* Short circuit. Nothing dominates the entry block. */ - if (useblock == ENTRY_BLOCK_PTR) - { - BITMAP_FREE (blocks); - return NULL; - } - bitmap_set_bit (blocks, useblock->index); + /* Short circuit. Nothing dominates the entry block. */ + if (useblock == ENTRY_BLOCK_PTR) + { + BITMAP_FREE (blocks); + return NULL; } + bitmap_set_bit (blocks, useblock->index); } } commondom = BASIC_BLOCK (bitmap_first_set_bit (blocks)); |