2 /* { dg-options "-O2 -mavx512dq -DAVX512DQ" } */
3 /* { dg-require-effective-target avx512dq } */
5 #include "avx512f-helper.h"
7 #define SIZE (AVX512F_LEN / 64)
8 #define SIZE_HALF (AVX512F_LEN_HALF / 32)
9 #include "avx512f-mask-type.h"
12 CALC (unsigned long long *s
, float *r
)
16 for (i
= 0; i
< SIZE_HALF
; i
++)
17 r
[i
] = (i
< SIZE
) ? (float) s
[i
] : 0;
23 UNION_TYPE (AVX512F_LEN
, i_q
) s
;
24 UNION_TYPE (AVX512F_LEN_HALF
,) res1
, res2
, res3
;
25 MASK_TYPE mask
= MASK_VALUE
;
26 float res_ref
[SIZE_HALF
];
29 for (i
= 0; i
< SIZE
; i
++)
31 s
.a
[i
] = 123 * (i
+ 2000);
32 res2
.a
[i
] = DEFAULT_VALUE
;
35 res1
.x
= INTRINSIC (_cvtepu64_ps
) (s
.x
);
36 res2
.x
= INTRINSIC (_mask_cvtepu64_ps
) (res2
.x
, mask
, s
.x
);
37 res3
.x
= INTRINSIC (_maskz_cvtepu64_ps
) (mask
, s
.x
);
41 if (UNION_CHECK (AVX512F_LEN_HALF
,) (res1
, res_ref
))
44 MASK_MERGE ()(res_ref
, mask
, SIZE
);
45 if (UNION_CHECK (AVX512F_LEN_HALF
,) (res2
, res_ref
))
48 MASK_ZERO ()(res_ref
, mask
, SIZE
);
49 if (UNION_CHECK (AVX512F_LEN_HALF
,) (res3
, res_ref
))