2 /* { dg-require-effective-target avx512er } */
3 /* { dg-options "-O2 -mavx512er" } */
5 #include "avx512er-check.h"
6 #include "avx512f-mask-type.h"
7 #include "avx512f-helper.h"
10 compute_vrcp28pd (double *s
, double *r
)
13 for (i
= 0; i
< 8; i
++)
20 union512d src
, res1
, res2
, res3
;
21 __mmask8 mask
= MASK_VALUE
;
25 for (i
= 0; i
< 8; i
++)
27 src
.a
[i
] = 179.345 - 6.5645 * i
;
28 res2
.a
[i
] = DEFAULT_VALUE
;
31 res1
.x
= _mm512_rcp28_pd (src
.x
);
32 res2
.x
= _mm512_mask_rcp28_pd (res2
.x
, mask
, src
.x
);
33 res3
.x
= _mm512_maskz_rcp28_pd (mask
, src
.x
);
35 compute_vrcp28pd (src
.a
, res_ref
);
37 if (check_rough_union512d (res1
, res_ref
, 0.0001))
40 MASK_MERGE (d
) (res_ref
, mask
, 8);
41 if (check_rough_union512d (res2
, res_ref
, 0.0001))
44 MASK_ZERO (d
) (res_ref
, mask
, 8);
45 if (check_rough_union512d (res3
, res_ref
, 0.0001))