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"
16 } __attribute__ ((packed
)) EVAL(unaligned_array
, AVX512F_LEN
,);
21 UNION_TYPE (AVX512F_LEN
, i_d
) s2
, res1
, res3
, res4
;
22 EVAL(unaligned_array
, AVX512F_LEN
,) s1
, res2
, res5
;
23 MASK_TYPE mask
= MASK_VALUE
;
26 for (i
= 0; i
< SIZE
; i
++)
28 s1
.a
[i
] = 12345 * (i
+ 2000) * sign
;
29 s2
.a
[i
] = 67890 * (i
+ 2000) * sign
;
30 res3
.a
[i
] = DEFAULT_VALUE
;
31 res5
.a
[i
] = DEFAULT_VALUE
;
35 #if AVX512F_LEN == 512
36 res1
.x
= _mm512_loadu_si512 (s1
.a
);
37 _mm512_storeu_si512 (res2
.a
, s2
.x
);
39 res3
.x
= INTRINSIC (_mask_loadu_epi32
) (res3
.x
, mask
, s1
.a
);
40 res4
.x
= INTRINSIC (_maskz_loadu_epi32
) (mask
, s1
.a
);
41 INTRINSIC (_mask_storeu_epi32
) (res5
.a
, mask
, s2
.x
);
43 #if AVX512F_LEN == 512
44 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res1
, s1
.a
))
47 if (UNION_CHECK (AVX512F_LEN
, i_d
) (s2
, res2
.a
))
51 MASK_MERGE (i_d
) (s1
.a
, mask
, SIZE
);
52 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res3
, s1
.a
))
55 MASK_ZERO (i_d
) (s1
.a
, mask
, SIZE
);
56 if (UNION_CHECK (AVX512F_LEN
, i_d
) (res4
, s1
.a
))
59 MASK_MERGE (i_d
) (s2
.a
, mask
, SIZE
);
60 if (UNION_CHECK (AVX512F_LEN
, i_d
) (s2
, res5
.a
))