aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_5.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_5.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_5.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
new file mode 100644
index 000000000..85ccdd0da
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/l_fma_double_5.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_5.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 } } */