aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr85597.c
blob: cf615f9c4645244c51e2194e6a5483e6d43139ef (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
/* { dg-do compile } */
/* { dg-options "-O3" } */
/* { dg-additional-options "-mfma" { target { x86_64-*-* i?86-*-* } } } */

extern double fma (double, double, double);

static inline void
bar (int i, double *D, double *S)
{
  while (i-- > 0)
    {
      D[0] = fma (1, S[0], D[0]);
      D[1] = fma (1, S[1], D[1]);
      D[2] = fma (1, S[2], D[2]);
      D[3] = fma (1, S[3], D[3]);
      D += 4;
      S += 4;
    }
}

void
foo (double *d, double *s)
{
  bar (10, d, s);
}