aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/pr59390_1.c
blob: 632eb6f9a4f2ce4f855b9f3ac877be3e08661d13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-std=c99 -O3" } */

extern double fma (double, double, double);
void fun() __attribute__((target("fma")));

__attribute__((target("fma")))
void 
other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n)
{
    int i;
    for (i = 0; i < n; i++) {
        out[i] = fma(a[i], b[i], c[i]);
    }   
}

/* { dg-final { scan-assembler "vfmadd" } } */