re PR rtl-optimization/27335 (ICE in get_loop_body)
PR rtl-optimization/27335 * loop-unroll.c (peel_loops_completely): Use loops->parray to walk the loops. * gcc.dg/pr27335.c: New test. From-SVN: r113648
This commit is contained in:
parent
ec4fc7edaf
commit
2c790a2884
@ -1,3 +1,9 @@
|
||||
2006-05-09 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR rtl-optimization/27335
|
||||
* loop-unroll.c (peel_loops_completely): Use loops->parray to walk the
|
||||
loops.
|
||||
|
||||
2006-05-08 Chao-ying Fu <fu@mips.com>
|
||||
Richard Sandiford <richard@codesourcery.com>
|
||||
|
||||
|
@ -233,22 +233,15 @@ loop_exit_at_end_p (struct loop *loop)
|
||||
static void
|
||||
peel_loops_completely (struct loops *loops, int flags)
|
||||
{
|
||||
struct loop *loop, *next;
|
||||
struct loop *loop;
|
||||
unsigned i;
|
||||
|
||||
loop = loops->tree_root;
|
||||
while (loop->inner)
|
||||
loop = loop->inner;
|
||||
|
||||
while (loop != loops->tree_root)
|
||||
/* Scan the loops, the inner ones first. */
|
||||
for (i = loops->num - 1; i > 0; i--)
|
||||
{
|
||||
if (loop->next)
|
||||
{
|
||||
next = loop->next;
|
||||
while (next->inner)
|
||||
next = next->inner;
|
||||
}
|
||||
else
|
||||
next = loop->outer;
|
||||
loop = loops->parray[i];
|
||||
if (!loop)
|
||||
continue;
|
||||
|
||||
loop->lpt_decision.decision = LPT_NONE;
|
||||
|
||||
@ -271,7 +264,6 @@ peel_loops_completely (struct loops *loops, int flags)
|
||||
verify_loop_structure (loops);
|
||||
#endif
|
||||
}
|
||||
loop = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-05-09 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR rtl-optimization/27335
|
||||
* gcc.dg/pr27335.c: New test.
|
||||
|
||||
2006-05-06 Richard Sandiford <richard@codesourcery.com>
|
||||
|
||||
* gcc.target/mips/mips-ps-5.c: New file.
|
||||
|
27
gcc/testsuite/gcc.dg/pr27335.c
Normal file
27
gcc/testsuite/gcc.dg/pr27335.c
Normal file
@ -0,0 +1,27 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -funroll-loops" } */
|
||||
|
||||
extern void bar () __attribute__ ((noreturn));
|
||||
|
||||
inline double
|
||||
baz (double *x, unsigned int y)
|
||||
{
|
||||
if (y >= 6)
|
||||
bar ();
|
||||
return x[y];
|
||||
}
|
||||
|
||||
double *a, *b;
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
unsigned int r, s, t;
|
||||
|
||||
for (r = 0; r < 2; r++)
|
||||
for (t = 0; t < 2; t++)
|
||||
{
|
||||
for (s = 0; s < 3; s++)
|
||||
b[r * 2 + t] += baz (a, 3 * s + t);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user