1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
4 /* Test that the compiler properly optimizes floating point multiply
5 and add instructions into FMA3 instructions. */
7 typedef double adouble
__attribute__((aligned(sizeof (double))));
12 /* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */
13 /* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */
14 /* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */
15 /* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */
16 /* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 32 } } */
17 /* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 32 } } */
18 /* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 32 } } */
19 /* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 32 } } */