diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-03-19 08:06:48 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-03-19 08:06:48 +0000 |
commit | 4f683506df6ae4137d5cd362ccb8a50302cf8a2d (patch) | |
tree | fd5eb06d2d9857070b38971a4639f934225a74fd /gcc/loop-unroll.c | |
parent | ce2c025c2480b6d36eb25b3aae877141ab4c3a5d (diff) | |
download | gcc-4f683506df6ae4137d5cd362ccb8a50302cf8a2d.zip gcc-4f683506df6ae4137d5cd362ccb8a50302cf8a2d.tar.gz gcc-4f683506df6ae4137d5cd362ccb8a50302cf8a2d.tar.bz2 |
re PR rtl-optimization/89753 (ICE in unroll_loop_constant_iterations, at loop-unroll.c:498)
PR rtl-optimization/89753
* loop-unroll.c (decide_unroll_constant_iterations): Make guard for
explicit unrolling factor even more robust.
From-SVN: r269791
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r-- | gcc/loop-unroll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 0164762..bc7840e 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -400,7 +400,7 @@ decide_unroll_constant_iterations (struct loop *loop, int flags) { /* However we cannot unroll completely at the RTL level a loop with constant number of iterations; it should have been peeled instead. */ - if ((unsigned) loop->unroll > desc->niter - 1) + if (desc->niter == 0 || (unsigned) loop->unroll > desc->niter - 1) { if (dump_file) fprintf (dump_file, ";; Loop should have been peeled\n"); |