2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
7 #include "avx512f-helper.h"
9 #define SIZE (AVX512F_LEN / 64)
10 #include "avx512f-mask-type.h"
13 CALC (short *r
, long long *s
)
16 for (i
= 0; i
< 8; i
++)
20 else if (s
[i
] > SHRT_MAX
)
24 r
[i
] = (i
< SIZE
) ? r
[i
] : 0;
32 UNION_TYPE (128, i_w
) res1
, res2
, res3
;
34 UNION_TYPE (AVX512F_LEN
, i_q
) src
;
35 MASK_TYPE mask
= MASK_VALUE
;
39 for (i
= 0; i
< SIZE
; i
++)
41 src
.a
[i
] = 1 + 34 * i
* sign
;
43 res2
.a
[i
] = DEFAULT_VALUE
;
44 res4
[i
] = DEFAULT_VALUE
;
47 res1
.x
= INTRINSIC (_cvtsepi64_epi16
) (src
.x
);
48 res2
.x
= INTRINSIC (_mask_cvtsepi64_epi16
) (res2
.x
, mask
, src
.x
);
49 res3
.x
= INTRINSIC (_maskz_cvtsepi64_epi16
) (mask
, src
.x
);
50 INTRINSIC (_mask_cvtsepi64_storeu_epi16
) (res4
, mask
, src
.x
);
52 CALC (res_ref
, src
.a
);
54 if (UNION_CHECK (128, i_w
) (res1
, res_ref
))
57 MASK_MERGE (i_w
) (res_ref
, mask
, SIZE
);
58 if (UNION_CHECK (128, i_w
) (res2
, res_ref
))
61 if (checkVs (res4
, res_ref
, 8))
64 MASK_ZERO (i_w
) (res_ref
, mask
, SIZE
);
65 if (UNION_CHECK (128, i_w
) (res3
, res_ref
))