diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2016-11-21 14:10:11 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2016-11-21 14:10:11 +0000 |
commit | eeeaf7199a10b61c188785e7a86cd3cdecba07c3 (patch) | |
tree | 46c5cc1f63ccd0f4d4fcab3d29aee80683832ad4 /gcc/tree-if-conv.c | |
parent | e0706cfb3313ea4af04f8de91127f14bac4cbf65 (diff) | |
download | gcc-eeeaf7199a10b61c188785e7a86cd3cdecba07c3.zip gcc-eeeaf7199a10b61c188785e7a86cd3cdecba07c3.tar.gz gcc-eeeaf7199a10b61c188785e7a86cd3cdecba07c3.tar.bz2 |
re PR tree-optimization/78413 (ICE in single_pred_edge, at basic-block.h:361)
[gcc]
2016-11-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/78413
* tree-if-conv.c (versionable_outer_loop_p): Require that both
inner and outer loop latches have single predecessors.
[gcc/testsuite]
2016-11-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/78413
* gcc.dg/tree-ssa/pr78413.c: New test.
From-SVN: r242661
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 1235faf..dc43d95 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2575,6 +2575,8 @@ version_loop_for_if_conversion (struct loop *loop) - The loop has a single exit. - The loop header has a single successor, which is the inner loop header. + - Each of the inner and outer loop latches have a single + predecessor. - The loop exit block has a single predecessor, which is the inner loop's exit block. */ @@ -2586,7 +2588,9 @@ versionable_outer_loop_p (struct loop *loop) || loop->inner->next || !single_exit (loop) || !single_succ_p (loop->header) - || single_succ (loop->header) != loop->inner->header) + || single_succ (loop->header) != loop->inner->header + || !single_pred_p (loop->latch) + || !single_pred_p (loop->inner->latch)) return false; basic_block outer_exit = single_pred (loop->latch); |