2 /* { dg-require-effective-target fma } */
3 /* { dg-options "-O2 -mfma" } */
8 #include "m256-check.h"
11 check_mm_fnmsub_sd (__m128d __A
, __m128d __B
, __m128d __C
)
19 e
.x
= _mm_fnmsub_sd (__A
, __B
, __C
);
20 for (i
= 1; i
< 2; i
++)
24 d
[0] = -a
.a
[0] * b
.a
[0] - c
.a
[0];
25 if (check_union128d (e
, d
))
30 check_mm_fnmsub_ss (__m128 __A
, __m128 __B
, __m128 __C
)
38 e
.x
= _mm_fnmsub_ss (__A
, __B
, __C
);
39 for (i
= 1; i
< 4; i
++)
43 d
[0] = -a
.a
[0] * b
.a
[0] - c
.a
[0];
44 if (check_union128 (e
, d
))
49 check_mm_fnmsub_ps (__m128 __A
, __m128 __B
, __m128 __C
)
57 e
.x
= _mm_fnmsub_ps (__A
, __B
, __C
);
58 for (i
= 0; i
< 4; i
++)
60 d
[i
] = -a
.a
[i
] * b
.a
[i
] - c
.a
[i
];
62 if (check_union128 (e
, d
))
67 check_mm_fnmsub_pd (__m128d __A
, __m128d __B
, __m128d __C
)
75 e
.x
= _mm_fnmsub_pd (__A
, __B
, __C
);
76 for (i
= 0; i
< 2; i
++)
78 d
[i
] = -a
.a
[i
] * b
.a
[i
] - c
.a
[i
];
80 if (check_union128d (e
, d
))
90 for (i
= 0; i
< 3; i
++)
92 for (j
= 0; j
< 4; j
++)
93 a
[i
].a
[j
] = i
* j
+ 3.5;
94 for (j
= 0; j
< 2; j
++)
95 b
[i
].a
[j
] = i
* j
+ 3.5;
97 check_mm_fnmsub_pd (b
[0].x
, b
[1].x
, b
[2].x
);
98 check_mm_fnmsub_sd (b
[0].x
, b
[1].x
, b
[2].x
);
99 check_mm_fnmsub_ps (a
[0].x
, a
[1].x
, a
[2].x
);
100 check_mm_fnmsub_ss (a
[0].x
, a
[1].x
, a
[2].x
);