No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.target / powerpc / doloop-1.c
blob036239969e81c862f7af017833b268b98650f95c
1 /* Make sure both loops are recognized as doloops.
2 If so, "bdnz" will be generated on ppc; if not,
3 you will get "ble" or "blt" or "bge". */
5 /* { dg-do compile { target powerpc-*-* } } */
6 /* { dg-options "-O2" } */
7 void foo (int count, char* pca, char* pcb) {
8 int i;
9 if (count > 10)
10 for (i = 0; i < count; ++i)
11 pcb += i;
12 else
13 for (i = 0; i < count; ++i)
14 pca += i;
15 *pca = *pcb;
17 /* { dg-final { scan-assembler "bdnz" } } */