2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
7 #include "avx512f-helper.h"
9 #define SIZE (AVX512F_LEN / 32)
10 #include "avx512f-mask-type.h"
15 UNION_TYPE (AVX512F_LEN
,) val
;
16 UNION_TYPE (AVX512F_LEN_HALF
, i_w
) res1
,res2
,res3
;
17 MASK_TYPE mask
= MASK_VALUE
;
21 for (i
= 0; i
< SIZE
; i
++)
23 res1
.a
[i
] = DEFAULT_VALUE
;
24 res2
.a
[i
] = DEFAULT_VALUE
;
25 res3
.a
[i
] = DEFAULT_VALUE
;
70 res1
.x
= _mm512_cvtps_ph (val
.x
, 0);
71 res2
.x
= _mm512_mask_cvtps_ph (res2
.x
, mask
, val
.x
, 0);
72 res3
.x
= _mm512_maskz_cvtps_ph (mask
, val
.x
, 0);
74 if (UNION_CHECK (AVX512F_LEN_HALF
, i_w
) (res1
, exp
))
77 MASK_MERGE (i_w
) (exp
, mask
, SIZE
);
78 if (UNION_CHECK (AVX512F_LEN_HALF
, i_w
) (res2
, exp
))
81 MASK_ZERO (i_w
) (exp
, mask
, SIZE
);
82 if (UNION_CHECK (AVX512F_LEN_HALF
, i_w
) (res3
, exp
))