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"
14 CALC (short *r
, long long *s
)
17 for (i
= 0; i
< 8; i
++)
21 else if (s
[i
] > SHRT_MAX
)
25 r
[i
] = (i
< SIZE
) ? r
[i
] : 0;
33 UNION_TYPE (128, i_w
) res1
, res2
, res3
;
35 UNION_TYPE (AVX512F_LEN
, i_q
) src
;
36 MASK_TYPE mask
= MASK_VALUE
;
40 for (i
= 0; i
< SIZE
; i
++)
42 src
.a
[i
] = 1 + 34 * i
* sign
;
44 res2
.a
[i
] = DEFAULT_VALUE
;
45 res4
[i
] = DEFAULT_VALUE
;
48 res1
.x
= INTRINSIC (_cvtsepi64_epi16
) (src
.x
);
49 res2
.x
= INTRINSIC (_mask_cvtsepi64_epi16
) (res2
.x
, mask
, src
.x
);
50 res3
.x
= INTRINSIC (_maskz_cvtsepi64_epi16
) (mask
, src
.x
);
51 INTRINSIC (_mask_cvtsepi64_storeu_epi16
) (res4
, mask
, src
.x
);
53 CALC (res_ref
, src
.a
);
55 if (UNION_CHECK (128, i_w
) (res1
, res_ref
))
58 MASK_MERGE (i_w
) (res_ref
, mask
, SIZE
);
59 if (UNION_CHECK (128, i_w
) (res2
, res_ref
))
62 if (checkVs (res4
, res_ref
, 8))
65 MASK_ZERO (i_w
) (res_ref
, mask
, SIZE
);
66 if (UNION_CHECK (128, i_w
) (res3
, res_ref
))