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"
12 CALC (float *s1
, float *s2
, float *r
)
17 for (i
= 0; i
< SIZE
; i
++)
19 tmp
= (*(int *) &s1
[i
]) & (*(int *) &s2
[i
]);
20 r
[i
] = *(float *) &tmp
;
27 UNION_TYPE (AVX512F_LEN
, ) s1
, s2
, res1
, res2
, res3
;
28 MASK_TYPE mask
= MASK_VALUE
;
32 for (i
= 0; i
< SIZE
; i
++)
36 res2
.a
[i
] = DEFAULT_VALUE
;
39 res1
.x
= INTRINSIC (_and_ps
) (s1
.x
, s2
.x
);
40 res2
.x
= INTRINSIC (_mask_and_ps
) (res2
.x
, mask
, s1
.x
, s2
.x
);
41 res3
.x
= INTRINSIC (_maskz_and_ps
) (mask
, s1
.x
, s2
.x
);
43 CALC (s1
.a
, s2
.a
, res_ref
);
45 if (UNION_CHECK (AVX512F_LEN
, ) (res1
, res_ref
))
48 MASK_MERGE () (res_ref
, mask
, SIZE
);
49 if (UNION_CHECK (AVX512F_LEN
, ) (res2
, res_ref
))
52 MASK_ZERO () (res_ref
, mask
, SIZE
);
53 if (UNION_CHECK (AVX512F_LEN
, ) (res3
, res_ref
))