diff options
author | Richard Biener <rguenther@suse.de> | 2012-12-14 13:35:03 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-12-14 13:35:03 +0000 |
commit | 13ea799b4ab20ae078ed754fa04b3c8766aa6954 (patch) | |
tree | 7045eb957d1f2631f5c062712b4103079a65ca2c /gcc/tree-ssa-loop-ivcanon.c | |
parent | 105e8c0682d220f6abc7320ff1ae05e20136080a (diff) | |
download | gcc-13ea799b4ab20ae078ed754fa04b3c8766aa6954.zip gcc-13ea799b4ab20ae078ed754fa04b3c8766aa6954.tar.gz gcc-13ea799b4ab20ae078ed754fa04b3c8766aa6954.tar.bz2 |
re PR tree-optimization/55684 (ICE in remove_redundant_iv_tests, at tree-ssa-loop-ivcanon.c:559)
2012-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/55684
* tree-ssa-loop-ivcanon.c (remove_redundant_iv_tests): Handle
gracefully the case where we cannot compute the number of
iterations at an exit.
* gcc.dg/torture/pr55684.c: New testcase.
From-SVN: r194499
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index d54f704..eef613c 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -555,9 +555,8 @@ remove_redundant_iv_tests (struct loop *loop) /* Only when we know the actual number of iterations, not just a bound, we can remove the exit. */ if (!number_of_iterations_exit (loop, exit_edge, - &niter, false, false)) - gcc_unreachable (); - if (!integer_onep (niter.assumptions) + &niter, false, false) + || !integer_onep (niter.assumptions) || !integer_zerop (niter.may_be_zero) || !niter.niter || TREE_CODE (niter.niter) != INTEGER_CST |