2 /* { dg-options "-mavx512f -O2" } */
3 /* { dg-require-effective-target avx512f } */
5 #include "avx512f-check.h"
10 compute_gatherqq (long long *res
, __mmask8 m8
, long long *idx
,
11 long long *src
, int scale
, long long *r
)
15 for (i
= 0; i
< 8; i
++)
19 (((unsigned char *) src
) + idx
[i
] * scale
);
34 for (i
= 0; i
< 8; i
++)
36 src
[i
] = 1983 * (i
+ 1) * (i
+ 2);
38 /* About to gather in reverse order,
39 divide by 2 to demonstrate scale */
40 idx
.a
[i
] = (64 - (i
+ 1) * 8) >> 1;
43 res
.x
= _mm512_mask_i64gather_epi64 (res
.x
, m8
, idx
.x
, src
, SCALE
);
44 compute_gatherqq (res
.a
, m8
, idx
.a
, src
, SCALE
, res_ref
);
46 if (check_union512i_q (res
, res_ref
))
49 res
.x
= _mm512_i64gather_epi64 (idx
.x
, src
, SCALE
);
50 compute_gatherqq (res
.a
, 0xFF, idx
.a
, src
, SCALE
, res_ref
);
52 if (check_union512i_q (res
, res_ref
))