index.html (3.10): Add note about mips atomicity.h.
[official-gcc.git] / gcc / testsuite / gcc.dg / doloop-1.c
blob3561a1794110026800d1b87ee2248604147f4acd
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". */
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" } } */
18 /* { dg-final { scan-assembler-not "blt" } } */