diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_4.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_4.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_4.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_4.c new file mode 100644 index 000000000..969f31c7f --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_4.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */ + +/* Test that the compiler properly optimizes floating point multiply + and add instructions into FMA3 instructions. */ + +typedef double adouble __attribute__((aligned(sizeof (double)))); +#define TYPE adouble + +#include "l_fma_4.h" + +/* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */ +/* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */ +/* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */ +/* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */ +/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 56 } } */ +/* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 56 } } */ +/* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 56 } } */ +/* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 56 } } */ |