1 /* Test whether using target specific options, we can generate FMA4 code. */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=k8" } } */
4 /* { dg-options "-O2 -march=k8 -mfpmath=sse -msse2" } */
6 extern void exit (int);
9 #warning "__FMA4__ should not be defined before #pragma GCC target."
12 #pragma GCC push_options
13 #pragma GCC target ("fma4")
16 #warning "__FMA4__ should have be defined after #pragma GCC target."
20 flt_mul_add (float a
, float b
, float c
)
25 #pragma GCC pop_options
27 #warning "__FMA4__ should not be defined after #pragma GCC pop target."
31 dbl_mul_add (double a
, double b
, double c
)
36 /* { dg-final { scan-assembler "vfmaddss" } } */
37 /* { dg-final { scan-assembler "addsd" } } */