From 662f0539e91e3ef32518a5e3300a1a9c69074f2f Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 7 Mar 2018 10:47:11 +0100 Subject: [PATCH] Backport r255818 2018-03-07 Martin Liska Backport from mainline 2017-12-19 Martin Liska PR rtl-optimization/82675 * loop-unroll.c (unroll_loop_constant_iterations): Allocate one more element in sbitmap. From-SVN: r258327 --- gcc/ChangeLog | 9 +++++++++ gcc/loop-unroll.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea0a7dcd912e..010614b14ef0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-03-07 Martin Liska + + Backport from mainline + 2017-12-19 Martin Liska + + PR rtl-optimization/82675 + * loop-unroll.c (unroll_loop_constant_iterations): Allocate one + more element in sbitmap. + 2018-03-07 Martin Liska Backport from mainline diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 4d26e2f7cd1a..c68cbc54892f 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -477,7 +477,7 @@ unroll_loop_constant_iterations (struct loop *loop) exit_mod = niter % (max_unroll + 1); - wont_exit = sbitmap_alloc (max_unroll + 1); + wont_exit = sbitmap_alloc (max_unroll + 2); bitmap_ones (wont_exit); auto_vec remove_edges; -- 2.47.2