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"
15 CALC (int *s1
, int *s2
, int *r
)
20 for (i
= 0; i
< SIZE
; i
++)
26 for (i
= 0; i
< SIZE
; i
++)
33 UNION_TYPE (AVX512F_LEN
, i_d
) res1
, res2
, res3
, s1
, s2
;
34 MASK_TYPE mask
= MASK_VALUE
;
38 for (i
= 0; i
< SIZE
; i
++)
42 res2
.a
[i
] = DEFAULT_VALUE
;
45 res1
.x
= INTRINSIC (_alignr_epi32
) (s1
.x
, s2
.x
, N
);
46 res2
.x
= INTRINSIC (_mask_alignr_epi32
) (res2
.x
, mask
, s1
.x
, s2
.x
, N
);
47 res3
.x
= INTRINSIC (_maskz_alignr_epi32
) (mask
, s1
.x
, s2
.x
, N
);
49 CALC (s1
.a
, s2
.a
, res_ref
);
51 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res1
, res_ref
))
54 MASK_MERGE (i_d
) (res_ref
, mask
, SIZE
);
55 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res2
, res_ref
))
58 MASK_ZERO (i_d
) (res_ref
, mask
, SIZE
);
59 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res3
, res_ref
))