2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
5 #include "avx512f-check.h"
7 #include "avx512f-helper.h"
9 #define SIZE (128 / 64)
10 #include "avx512f-mask-type.h"
13 calc_div (double *r
, double *s1
, double *s2
)
23 union128d res1
, res2
, res3
, res4
, src1
, src2
;
28 for (i
= 0; i
< SIZE
; i
++)
30 src1
.a
[i
] = 1.5 + 34.67 * i
* sign
;
31 src2
.a
[i
] = -22.17 * i
* sign
+ 1.0;
32 res1
.a
[i
] = DEFAULT_VALUE
;
33 res3
.a
[i
] = DEFAULT_VALUE
;
37 res1
.x
= _mm_mask_div_sd (res1
.x
, mask
, src1
.x
, src2
.x
);
38 res2
.x
= _mm_maskz_div_sd (mask
, src1
.x
, src2
.x
);
39 res3
.x
= _mm_mask_div_round_sd (res3
.x
, mask
, src1
.x
, src2
.x
, _MM_FROUND_NO_EXC
);
40 res4
.x
= _mm_maskz_div_round_sd (mask
, src1
.x
, src2
.x
, _MM_FROUND_NO_EXC
);
42 calc_div (res_ref
, src1
.a
, src2
.a
);
44 MASK_MERGE (d
) (res_ref
, mask
, 1);
45 if (check_union128d (res1
, res_ref
))
48 MASK_ZERO (d
) (res_ref
, mask
, 1);
49 if (check_union128d (res2
, res_ref
))
52 calc_div (res_ref
, src1
.a
, src2
.a
);
54 MASK_MERGE (d
) (res_ref
, mask
, 1);
55 if (check_union128d (res3
, res_ref
))
58 MASK_ZERO (d
) (res_ref
, mask
, 1);
59 if (check_union128d (res4
, res_ref
))