2 /* { dg-options "-O2 -mavx512dq" } */
3 /* { dg-require-effective-target avx512dq } */
6 #include "avx512f-helper.h"
8 #define SIZE (AVX512F_LEN / 32)
9 #include "avx512f-mask-type.h"
14 CALC (float *s
, float *r
)
18 for (i
= 0; i
< SIZE
; i
++)
20 float tmp
= (int) (4 * s
[i
]) / 4.0;
28 UNION_TYPE (AVX512F_LEN
,) s
, res1
, res2
, res3
;
29 MASK_TYPE mask
= MASK_VALUE
;
33 for (i
= 0; i
< SIZE
; i
++)
35 s
.a
[i
] = 123.456 * (i
+ 2000) * sign
;
36 res2
.a
[i
] = DEFAULT_VALUE
;
40 res1
.x
= INTRINSIC (_reduce_ps
) (s
.x
, IMM
);
41 res2
.x
= INTRINSIC (_mask_reduce_ps
) (res2
.x
, mask
, s
.x
, IMM
);
42 res3
.x
= INTRINSIC (_maskz_reduce_ps
) (mask
, s
.x
, IMM
);
46 if (UNION_FP_CHECK (AVX512F_LEN
,) (res1
, res_ref
))
49 MASK_MERGE () (res_ref
, mask
, SIZE
);
50 if (UNION_FP_CHECK (AVX512F_LEN
,) (res2
, res_ref
))
53 MASK_ZERO () (res_ref
, mask
, SIZE
);
54 if (UNION_FP_CHECK (AVX512F_LEN
,) (res3
, res_ref
))