2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
7 #include "avx512f-helper.h"
9 #define SRC_SIZE (AVX512F_LEN / 32)
10 #include "avx512f-mask-type.h"
11 #define DST_SIZE (AVX512F_LEN / 64)
14 CALC (unsigned int *s1
, unsigned int *s2
, unsigned long long *r
)
18 for (i
= 0; i
< DST_SIZE
; i
++)
19 r
[i
] = s1
[i
* 2] * s2
[i
* 2];
25 UNION_TYPE (AVX512F_LEN
, i_ud
) s1
, s2
;
26 UNION_TYPE (AVX512F_LEN
, i_uq
) res1
, res2
, res3
;
27 MASK_TYPE mask
= MASK_VALUE
;
28 unsigned long long res_ref
[DST_SIZE
];
31 for (i
= 0; i
< SRC_SIZE
; i
++)
36 for (i
= 0; i
< DST_SIZE
; i
++)
37 res2
.a
[i
] = DEFAULT_VALUE
;
39 CALC (s1
.a
, s2
.a
, res_ref
);
41 res1
.x
= INTRINSIC (_mul_epu32
) (s1
.x
, s2
.x
);
42 res2
.x
= INTRINSIC (_mask_mul_epu32
) (res2
.x
, mask
, s1
.x
, s2
.x
);
43 res3
.x
= INTRINSIC (_maskz_mul_epu32
) (mask
, s1
.x
, s2
.x
);
45 if (UNION_CHECK (AVX512F_LEN
, i_uq
) (res1
, res_ref
))
48 MASK_MERGE (i_uq
) (res_ref
, mask
, DST_SIZE
);
49 if (UNION_CHECK (AVX512F_LEN
, i_uq
) (res2
, res_ref
))
52 MASK_ZERO (i_uq
) (res_ref
, mask
, DST_SIZE
);
53 if (UNION_CHECK (AVX512F_LEN
, i_uq
) (res3
, res_ref
))