aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-2.c
blob: 304ed11c4286c6fd68cc0c105f3dae3c42071259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* PR target/50749: Verify that subsequent post-increment addressings
   are generated.  */
/* { 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]\+" 5 { xfail *-*-*} } } */

float*
test_func_00 (float* p, float* x)
{
  float r = 0;
  r += *p++;
  r += *p++;
  *x = r;
  return p;
}

float*
test_func_01 (float* p, float* x)
{
  float r = 0;
  r += *p++;
  r += *p++;
  r += *p++;
  *x = r;
  return p;
}