aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-unswitch.c
diff options
context:
space:
mode:
authorYuri Rumyantsev <ysrumyan@gmail.com>2015-12-18 10:16:56 +0000
committerIlya Enkovich <ienkovich@gcc.gnu.org>2015-12-18 10:16:56 +0000
commit5c846df71f33216fa8b5ccf21e88ee64b58b678a (patch)
treef1d8e45b62b6d4c701c6a9043e57dedb159179af /gcc/tree-ssa-loop-unswitch.c
parentb3d51f238b954ccab35dfcbebf5321bc91106a40 (diff)
downloadgcc-5c846df71f33216fa8b5ccf21e88ee64b58b678a.zip
gcc-5c846df71f33216fa8b5ccf21e88ee64b58b678a.tar.gz
gcc-5c846df71f33216fa8b5ccf21e88ee64b58b678a.tar.bz2
re PR tree-optimization/68906 (ICE at -O3 on x86_64-linux-gnu: verify_ssa failed)
gcc/ 2015-12-18 Yuri Rumyantsev <ysrumyan@gmail.com> PR tree-optimization/68906 * tree-ssa-loop-unswitch.c (tree_unswitch_outer_loop): Add check that an exit block belongs to LOOP. gcc/testsuite/ 2015-12-18 Yuri Rumyantsev <ysrumyan@gmail.com> PR tree-optimization/68906 * gcc.dg/torture/pr68906.c: New test. From-SVN: r231812
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
-rw-r--r--gcc/tree-ssa-loop-unswitch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c
index c340bcb..a17c60e 100644
--- a/gcc/tree-ssa-loop-unswitch.c
+++ b/gcc/tree-ssa-loop-unswitch.c
@@ -429,9 +429,9 @@ tree_unswitch_outer_loop (struct loop *loop)
gcc_assert (loop->inner);
if (loop->inner->next)
return false;
- /* Accept loops with single exit only. */
+ /* Accept loops with single exit only which is not from inner loop. */
exit = single_exit (loop);
- if (!exit)
+ if (!exit || exit->src->loop_father != loop)
return false;
/* Check that phi argument of exit edge is not defined inside loop. */
if (!check_exit_phi (loop))