diff options
author | Richard Biener <rguenther@suse.de> | 2014-05-19 14:33:31 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-05-19 14:33:31 +0000 |
commit | 1d44def2c2faae5f7e5a58fb57e0c9991a339bd5 (patch) | |
tree | e67c419dec0c9e20aaf8ed809ff91af44ab50f25 /gcc/tree-ssa-sccvn.c | |
parent | 051351362bfe8552549443b77bdbd0ac5e003eac (diff) | |
download | gcc-1d44def2c2faae5f7e5a58fb57e0c9991a339bd5.zip gcc-1d44def2c2faae5f7e5a58fb57e0c9991a339bd5.tar.gz gcc-1d44def2c2faae5f7e5a58fb57e0c9991a339bd5.tar.bz2 |
re PR tree-optimization/61221 (ICE on valid code at -O1 and above on x86_64-linux-gnu)
2014-05-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/61221
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Do nothing for unreachable blocks.
* tree-ssa-sccvn.c (cond_dom_walker::before_dom_children):
Improve unreachability detection.
* gcc.dg/torture/pr61221.c: New testcase.
From-SVN: r210614
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index bd60372..fc00682 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -4177,11 +4177,13 @@ cond_dom_walker::before_dom_children (basic_block bb) if (fail) return; - /* If any of the predecessor edges are still marked as possibly - executable consider this block reachable. */ + /* If any of the predecessor edges that do not come from blocks dominated + by us are still marked as possibly executable consider this block + reachable. */ bool reachable = bb == ENTRY_BLOCK_PTR_FOR_FN (cfun); FOR_EACH_EDGE (e, ei, bb->preds) - reachable |= (e->flags & EDGE_EXECUTABLE); + if (!dominated_by_p (CDI_DOMINATORS, e->src, bb)) + reachable |= (e->flags & EDGE_EXECUTABLE); /* If the block is not reachable all outgoing edges are not executable. */ |