| 1 |
/* Make sure the doloop optimization is done for this loop. */ |
| 2 |
/* { dg-do compile { target powerpc*-*-* } } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
/* { dg-final { scan-assembler "bdn" } } */ |
| 5 |
extern int a[]; |
| 6 |
int foo(int w) { |
| 7 |
int n = w; |
| 8 |
while (n >= 512) |
| 9 |
{ |
| 10 |
a[n] = 42; |
| 11 |
n -= 256; |
| 12 |
} |
| 13 |
} |