2 /* { dg-options "-O2 -mavx512dq" } */
3 /* { dg-require-effective-target avx512dq } */
6 #include "avx512f-helper.h"
8 #define SIZE (AVX512F_LEN / 64)
9 #include "avx512f-mask-type.h"
14 CALC (double *s
, double *r
)
18 for (i
= 0; i
< SIZE
; i
++)
20 double tmp
= (int) (4 * s
[i
]) / 4.0;
28 UNION_TYPE (AVX512F_LEN
, d
) 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_pd
) (s
.x
, IMM
);
41 res2
.x
= INTRINSIC (_mask_reduce_pd
) (res2
.x
, mask
, s
.x
, IMM
);
42 res3
.x
= INTRINSIC (_maskz_reduce_pd
) (mask
, s
.x
, IMM
);
46 if (UNION_FP_CHECK (AVX512F_LEN
, d
) (res1
, res_ref
))
49 MASK_MERGE (d
) (res_ref
, mask
, SIZE
);
50 if (UNION_FP_CHECK (AVX512F_LEN
, d
) (res2
, res_ref
))
53 MASK_ZERO (d
) (res_ref
, mask
, SIZE
);
54 if (UNION_FP_CHECK (AVX512F_LEN
, d
) (res3
, res_ref
))