diff options
author | Richard Biener <rguenther@suse.de> | 2018-05-03 13:20:02 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-05-03 13:20:02 +0000 |
commit | a378f85c5416aaf7ffea7ee114ee166ff4dd92da (patch) | |
tree | 68a04fc7dd5d757a880144521e04223c13eb5ba5 /gcc/tree-ssa-threadupdate.c | |
parent | b7244ccba711298c906d4c7ca51f9f49bf2438c7 (diff) | |
download | gcc-a378f85c5416aaf7ffea7ee114ee166ff4dd92da.zip gcc-a378f85c5416aaf7ffea7ee114ee166ff4dd92da.tar.gz gcc-a378f85c5416aaf7ffea7ee114ee166ff4dd92da.tar.bz2 |
re PR tree-optimization/85615 (ICE at -O2 and above on valid code on x86_64-linux-gnu: in dfs_enumerate_from, at cfganal.c:1197)
2018-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/85615
* tree-ssa-threadupdate.c (thread_block_1): Only allow exits
to loops not nested in BBs loop father to avoid creating multi-entry
loops.
* gcc.dg/torture/pr85615.c: New testcase.
From-SVN: r259891
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 9ab9e7d..b6bc5fc 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -1309,7 +1309,9 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners) and thread this elsewhere, so just cancel the jump threading request by clearing the AUX field now. */ if (bb->loop_father != e2->src->loop_father - && !loop_exit_edge_p (e2->src->loop_father, e2)) + && (!loop_exit_edge_p (e2->src->loop_father, e2) + || flow_loop_nested_p (bb->loop_father, + e2->dest->loop_father))) { /* Since this case is not handled by our special code to thread through a loop header, we must explicitly |