PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / ia64 / builtin-fma-1.c
bloba4b2e063ce25bf89039f74e5552650c3a506147c
1 /* { dg-do compile } */
2 /* { dg-options "-O" } */
3 /* Don't confuse the fma insn with the fma in the filename. */
4 /* { dg-final { scan-assembler-times "fma\\." 4 } } */
5 /* { dg-final { scan-assembler-times "fms" 2 } } */
6 /* { dg-final { scan-assembler-times "fnma" 4 } } */
8 #ifndef __FP_FAST_FMAF
9 # error "__FP_FAST_FMAF should be defined"
10 #endif
11 #ifndef __FP_FAST_FMA
12 # error "__FP_FAST_FMA should be defined"
13 #endif
15 float f0(float x, float y, float z) { return __builtin_fmaf(x,y,z); }
16 float f1(float x, float y, float z) { return __builtin_fmaf(x,y,-z); }
17 float f2(float x, float y, float z) { return __builtin_fmaf(-x,y,z); }
18 float f3(float x, float y, float z) { return __builtin_fmaf(x,-y,z); }
19 float f4(float x, float y, float z) { return __builtin_fmaf(-x,-y,z); }
21 double d0(double x, double y, double z) { return __builtin_fma(x,y,z); }
22 double d1(double x, double y, double z) { return __builtin_fma(x,y,-z); }
23 double d2(double x, double y, double z) { return __builtin_fma(-x,y,z); }
24 double d3(double x, double y, double z) { return __builtin_fma(x,-y,z); }
25 double d4(double x, double y, double z) { return __builtin_fma(-x,-y,z); }