blob: b6dce42fca7f13eca5e4c0e56318eb0bce70a07a [file] [log] [blame]
/* PR target/50749: Verify that post-increment addressing is generated
inside a loop. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
/* { dg-final { scan-assembler-times "fmov.s\t@r\[0-9]\+\\+,fr\[0-9]\+" 3 { xfail *-*-*} } } */
float
test_func_00 (float* p, int c)
{
float r = 0;
do
{
r += *p++;
r += *p++;
r += *p++;
} while (--c);
return r;
}