2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
7 #include "avx512f-helper.h"
9 #define SIZE (AVX512F_LEN / 64)
10 #include "avx512f-mask-type.h"
13 CALC (long long *s
, long long *r
, MASK_TYPE mask
)
17 for (i
= 0, k
= 0; i
< SIZE
; i
++)
27 UNION_TYPE (AVX512F_LEN
, i_q
) s1
, res1
, res2
, res3
, res4
;
28 MASK_TYPE mask
= MASK_VALUE
;
30 long long res_ref1
[SIZE
];
31 long long res_ref2
[SIZE
];
34 for (i
= 0; i
< SIZE
; i
++)
36 s1
.a
[i
] = 12345 * (i
+ 200) * sign
;
37 s2
[i
] = 67890 * (i
+ 300) * sign
;
38 res1
.a
[i
] = DEFAULT_VALUE
;
39 res3
.a
[i
] = DEFAULT_VALUE
;
43 res1
.x
= INTRINSIC (_mask_expand_epi64
) (res1
.x
, mask
, s1
.x
);
44 res2
.x
= INTRINSIC (_maskz_expand_epi64
) (mask
, s1
.x
);
45 res3
.x
= INTRINSIC (_mask_expandloadu_epi64
) (res3
.x
, mask
, s2
);
46 res4
.x
= INTRINSIC (_maskz_expandloadu_epi64
) (mask
, s2
);
48 CALC (s1
.a
, res_ref1
, mask
);
49 CALC (s2
, res_ref2
, mask
);
51 MASK_MERGE (i_q
) (res_ref1
, mask
, SIZE
);
52 if (UNION_CHECK (AVX512F_LEN
, i_q
) (res1
, res_ref1
))
55 MASK_ZERO (i_q
) (res_ref1
, mask
, SIZE
);
56 if (UNION_CHECK (AVX512F_LEN
, i_q
) (res2
, res_ref1
))
59 MASK_MERGE (i_q
) (res_ref2
, mask
, SIZE
);
60 if (UNION_CHECK (AVX512F_LEN
, i_q
) (res3
, res_ref2
))
63 MASK_ZERO (i_q
) (res_ref2
, mask
, SIZE
);
64 if (UNION_CHECK (AVX512F_LEN
, i_q
) (res4
, res_ref2
))