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"
11 #define ALIGN ((AVX512F_LEN) / 8)
16 UNION_TYPE (AVX512F_LEN
, i_d
) s2
, s3
, res1
, res2
, res5
, res6
, res7
, res8
;
17 MASK_TYPE mask
= MASK_VALUE
;
18 int s1
[SIZE
] __attribute__ ((aligned (ALIGN
)));
19 int res3
[SIZE
] __attribute__ ((aligned (ALIGN
)));
20 int res4
[SIZE
] __attribute__ ((aligned (ALIGN
)));
21 int res9
[SIZE
] __attribute__ ((aligned (ALIGN
)));
24 for (i
= 0; i
< SIZE
; i
++)
26 s1
[i
] = 1234 * (i
+ 2000) * sign
;
27 s2
.a
[i
] = 5678 * (i
- 30) * sign
;
28 s3
.a
[i
] = 9012 * (i
+ 40) * sign
;
29 res5
.a
[i
] = DEFAULT_VALUE
;
30 res7
.a
[i
] = DEFAULT_VALUE
;
31 res9
[i
] = DEFAULT_VALUE
;
35 #if AVX512F_LEN == 512
36 res1
.x
= INTRINSIC (_load_si512
) (s1
);
37 res2
.x
= INTRINSIC (_load_epi32
) (s1
);
38 INTRINSIC (_store_si512
) (res3
, s2
.x
);
39 INTRINSIC (_store_epi32
) (res4
, s2
.x
);
41 res5
.x
= INTRINSIC (_mask_mov_epi32
) (res5
.x
, mask
, s3
.x
);
42 res6
.x
= INTRINSIC (_maskz_mov_epi32
) (mask
, s3
.x
);
43 res7
.x
= INTRINSIC (_mask_load_epi32
) (res7
.x
, mask
, s1
);
44 res8
.x
= INTRINSIC (_maskz_load_epi32
) (mask
, s1
);
45 INTRINSIC (_mask_store_epi32
) (res9
, mask
, s2
.x
);
47 #if AVX512F_LEN == 512
48 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res1
, s1
))
51 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res2
, s1
))
54 if (UNION_CHECK (AVX512F_LEN
, i_d
) (s2
, res3
))
57 if (UNION_CHECK (AVX512F_LEN
, i_d
) (s2
, res4
))
61 MASK_MERGE (i_d
) (s3
.a
, mask
, SIZE
);
62 if (checkVi (res5
.a
, s3
.a
, SIZE
))
65 MASK_ZERO (i_d
) (s3
.a
, mask
, SIZE
);
66 if (checkVi (res6
.a
, s3
.a
, SIZE
))
69 MASK_MERGE (i_d
) (s1
, mask
, SIZE
);
70 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res7
, s1
))
73 MASK_ZERO (i_d
) (s1
, mask
, SIZE
);
74 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res8
, s1
))
77 MASK_MERGE (i_d
) (s2
.a
, mask
, SIZE
);
78 if (UNION_CHECK (AVX512F_LEN
, i_d
) (s2
, res9
))