diff options
author | Jeff Law <law@redhat.com> | 2018-11-23 23:51:26 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2018-11-23 23:51:26 -0700 |
commit | eabec4d3c56af2e8959c8329b5257a81c606da60 (patch) | |
tree | 7b9dd79c18254c90d7d3c7966dbf1844935513fe /gcc/tree-ssa-threadupdate.c | |
parent | bdcd6cae1200660b26fb63ac50affab559c38213 (diff) | |
download | gcc-eabec4d3c56af2e8959c8329b5257a81c606da60.zip gcc-eabec4d3c56af2e8959c8329b5257a81c606da60.tar.gz gcc-eabec4d3c56af2e8959c8329b5257a81c606da60.tar.bz2 |
re PR rtl-optimization/87468 (ice "wrong amount of branch edges after conditional jump in bb")
PR rtl-optimization/87468
* tree-ssa-threadupdate.c (create_block_for_threading): Clear
EDGE_IGNORE on all outgoing edges of the duplicate block.
From-SVN: r266426
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 6630516..e7c7ca6 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -336,7 +336,17 @@ create_block_for_threading (basic_block bb, rd->dup_blocks[count] = duplicate_block (bb, NULL, NULL); FOR_EACH_EDGE (e, ei, rd->dup_blocks[count]->succs) - e->aux = NULL; + { + e->aux = NULL; + + /* If we duplicate a block with an outgoing edge marked as + EDGE_IGNORE, we must clear EDGE_IGNORE so that it doesn't + leak out of the current pass. + + It would be better to simplify switch statements and remove + the edges before we get here, but the sequencing is nontrivial. */ + e->flags &= ~EDGE_IGNORE; + } /* Zero out the profile, since the block is unreachable for now. */ rd->dup_blocks[count]->count = profile_count::uninitialized (); |