2 /* { dg-options "-O2 -mavx512f" } */
3 /* { dg-require-effective-target avx512f } */
7 #include "avx512f-helper.h"
9 #define SIZE (AVX512F_LEN / 32)
10 #include "avx512f-mask-type.h"
13 CALC (int *s1
, unsigned char imm
, int *r
)
17 for (j
= 0; j
< SIZE
/ 4; j
++)
20 for (i
= 0; i
< 4; i
++)
22 s1
[((imm
& (0x3 << (2 * i
))) >> (2 * i
)) + offset
];
29 UNION_TYPE (AVX512F_LEN
, i_d
) s1
, res1
, res2
, res3
;
32 MASK_TYPE mask
= MASK_VALUE
;
34 for (j
= 0; j
< SIZE
; j
++)
37 res1
.a
[j
] = DEFAULT_VALUE
;
38 res2
.a
[j
] = DEFAULT_VALUE
;
39 res3
.a
[j
] = DEFAULT_VALUE
;
43 res1
.x
= INTRINSIC (_shuffle_epi32
) (s1
.x
, 0xec);
44 res2
.x
= INTRINSIC (_mask_shuffle_epi32
) (res2
.x
, mask
, s1
.x
, 0xec);
45 res3
.x
= INTRINSIC (_maskz_shuffle_epi32
) (mask
, s1
.x
, 0xec);
47 CALC (s1
.a
, 0xec, res_ref
);
49 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res1
, res_ref
))
52 MASK_MERGE (i_d
) (res_ref
, mask
, SIZE
);
53 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res2
, res_ref
))
56 MASK_ZERO (i_d
) (res_ref
, mask
, SIZE
);
57 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res3
, res_ref
))