summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-4.c
blob: 65f45a3f9754f0e17aaf6d16fab6506577e74e6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR target/50749: Verify that post-increment addressing is generated
   inside a loop.  */
/* { dg-do compile { target { any_fpu } } }  */
/* { dg-options "-O2" } */
/* { 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;
}