blob: 996c4ca90df9d5c54f1598643166edf4eb3d6876 [file] [log] [blame]
/* Check that the decrement-and-test instruction is generated. */
/* { dg-do compile } */
/* { dg-options "-O1" } */
/* { dg-final { scan-assembler-times "dt\tr" 2 } } */
int
test_00 (int* x, int c)
{
int s = 0;
int i;
for (i = 0; i < c; ++i)
s += x[i];
return s;
}
int
test_01 (int* x, int c)
{
int s = 0;
int i;
for (i = 0; i < c; ++i)
s += *--x;
return s;
}