diff options
author | Jeff Law <law@redhat.com> | 2013-09-10 20:23:48 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2013-09-10 20:23:48 -0600 |
commit | 9e1376e94de56d624eb99bdcb5dff7a0bb03fc21 (patch) | |
tree | 2477817e3acba588af69e3d3c3b9166d7e6d8757 /gcc/tree-ssa-threadupdate.c | |
parent | df7d9dfde3ac4d964866ce8867710dc788ecf3d7 (diff) | |
download | gcc-9e1376e94de56d624eb99bdcb5dff7a0bb03fc21.zip gcc-9e1376e94de56d624eb99bdcb5dff7a0bb03fc21.tar.gz gcc-9e1376e94de56d624eb99bdcb5dff7a0bb03fc21.tar.bz2 |
re PR tree-optimization/58380 (ice in fold_comparison)
PR tree-optimization/58380
* tree-ssa-threadupdate.c (thread_block): Recognize another case
of threading through a buried loop header.
* tree-ssa-threadedge.c (thread_around_empty_blocks): Correct
return value for single successor case.
* g++.dg/torture/pr58380.C: New test.
2013-09-10 Jeff Law <law@redhat.com>
From-SVN: r202489
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 3c3d3bc..6d43dc3 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -659,8 +659,10 @@ thread_block (basic_block bb, bool noloop_only) threading path. We do not try 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)) + if ((bb->loop_father != e2->src->loop_father + && !loop_exit_edge_p (e2->src->loop_father, e2)) + || (e2->src->loop_father != e2->dest->loop_father + && !loop_exit_edge_p (e2->src->loop_father, e2))) { /* Since this case is not handled by our special code to thread through a loop header, we must explicitly |