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