summaryrefslogtreecommitdiff
path: root/gcc/loop-unroll.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-03-11 11:37:46 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-03-11 11:37:46 +0000
commitcb90c0014070f4ace5bb88258b31c1d654162306 (patch)
tree67e4547921b424a18aea9fc7f615bce6bcb2d254 /gcc/loop-unroll.c
parent03001a351528a1fc35bfe0c70deb08c7e18d314b (diff)
re PR rtl-optimization/89588 (ICE in unroll_loop_constant_iterations, at loop-unroll.c:498)
PR rtl-optimization/89588 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for explicit unrolling factor more robust. From-SVN: r269579
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r--gcc/loop-unroll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index cbc66736c04..0164762bee9 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 - 1 > desc->niter - 2)
+ if ((unsigned) loop->unroll > desc->niter - 1)
{
if (dump_file)
fprintf (dump_file, ";; Loop should have been peeled\n");