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
This commit is contained in:
parent
03001a3515
commit
cb90c00140
|
@ -1,3 +1,9 @@
|
||||||
|
2019-03-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
PR rtl-optimization/89588
|
||||||
|
* loop-unroll.c (decide_unroll_constant_iterations): Make guard for
|
||||||
|
explicit unrolling factor more robust.
|
||||||
|
|
||||||
2019-03-11 Richard Biener <rguenther@suse.de>
|
2019-03-11 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/89649
|
PR tree-optimization/89649
|
||||||
|
|
|
@ -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
|
/* However we cannot unroll completely at the RTL level a loop with
|
||||||
constant number of iterations; it should have been peeled instead. */
|
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)
|
if (dump_file)
|
||||||
fprintf (dump_file, ";; Loop should have been peeled\n");
|
fprintf (dump_file, ";; Loop should have been peeled\n");
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2019-03-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* c-c++-common/unroll-6.c: New test.
|
||||||
|
|
||||||
2019-03-11 Paolo Carlini <paolo.carlini@oracle.com>
|
2019-03-11 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR c++/87571
|
PR c++/87571
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-O -fno-tree-loop-optimize" } */
|
||||||
|
|
||||||
|
void test (void)
|
||||||
|
{
|
||||||
|
#pragma GCC unroll 2
|
||||||
|
for (int nv = 0; nv <= 2; nv += 2)
|
||||||
|
{}
|
||||||
|
}
|
Loading…
Reference in New Issue