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 *r
, int *s1
, long long *s2
)
17 for (i
= 0; i
< SIZE
; i
++)
20 count
< 32 ? (s1
[i
] >> count
) : (s1
[i
] > 0 ? 0 : 0xFFFFFFFF);
28 UNION_TYPE (AVX512F_LEN
, i_d
) res1
, res2
, res3
, src1
;
29 UNION_TYPE (128, i_q
) src2
;
30 MASK_TYPE mask
= MASK_VALUE
;
35 for (i
= 0; i
< SIZE
; i
++)
37 src1
.a
[i
] = 2 + sign
* 7 * i
% 291;
41 for (imm
= 1; imm
<= 33; imm
++)
44 for (i
= 0; i
< SIZE
; i
++)
45 res2
.a
[i
] = DEFAULT_VALUE
;
47 res1
.x
= INTRINSIC (_sra_epi32
) (src1
.x
, src2
.x
);
49 INTRINSIC (_mask_sra_epi32
) (res2
.x
, mask
, src1
.x
, src2
.x
);
50 res3
.x
= INTRINSIC (_maskz_sra_epi32
) (mask
, src1
.x
, src2
.x
);
52 CALC (res_ref
, src1
.a
, src2
.a
);
54 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res1
, res_ref
))
57 MASK_MERGE (i_d
) (res_ref
, mask
, SIZE
);
58 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res2
, res_ref
))
61 MASK_ZERO (i_d
) (res_ref
, mask
, SIZE
);
62 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res3
, res_ref
))