2 /* { dg-options "-O2 -mavx512dq" } */
3 /* { dg-require-effective-target avx512dq } */
6 #include "avx512f-helper.h"
8 #define SIZE (AVX512F_LEN / 64)
9 #define SIZE_HALF (AVX512F_LEN_HALF / 32)
10 #include "avx512f-mask-type.h"
13 CALC (unsigned long long *s
, float *r
)
17 for (i
= 0; i
< SIZE_HALF
; i
++)
18 r
[i
] = (i
< SIZE
) ? (float) s
[i
] : 0;
24 UNION_TYPE (AVX512F_LEN
, i_q
) s
;
25 UNION_TYPE (AVX512F_LEN_HALF
,) res1
, res2
, res3
;
26 MASK_TYPE mask
= MASK_VALUE
;
27 float res_ref
[SIZE_HALF
];
30 for (i
= 0; i
< SIZE
; i
++)
32 s
.a
[i
] = 123 * (i
+ 2000);
33 res2
.a
[i
] = DEFAULT_VALUE
;
36 res1
.x
= INTRINSIC (_cvtepu64_ps
) (s
.x
);
37 res2
.x
= INTRINSIC (_mask_cvtepu64_ps
) (res2
.x
, mask
, s
.x
);
38 res3
.x
= INTRINSIC (_maskz_cvtepu64_ps
) (mask
, s
.x
);
42 if (UNION_CHECK (AVX512F_LEN_HALF
,) (res1
, res_ref
))
45 MASK_MERGE ()(res_ref
, mask
, SIZE
);
46 if (UNION_CHECK (AVX512F_LEN_HALF
,) (res2
, res_ref
))
49 MASK_ZERO ()(res_ref
, mask
, SIZE
);
50 if (UNION_CHECK (AVX512F_LEN_HALF
,) (res3
, res_ref
))