2 /* { dg-options "-O2 -mavx512dq" } */
3 /* { dg-require-effective-target avx512dq } */
6 #include "avx512f-helper.h"
9 #define SIZE (AVX512F_LEN / 64)
10 #include "avx512f-mask-type.h"
13 CALC (UNION_TYPE (AVX512F_LEN
, i_q
) s1
, union128i_q s2
,
14 long long *res_ref
, int mask
)
16 memcpy (res_ref
, s1
.a
, SIZE
* sizeof (long long));
17 memcpy (res_ref
+ mask
* 2, s2
.a
, 16);
23 UNION_TYPE (AVX512F_LEN
, i_q
) s1
, res1
, res2
, res3
;
25 long long res_ref
[SIZE
];
26 MASK_TYPE mask
= MASK_VALUE
;
29 for (j
= 0; j
< SIZE
; j
++)
32 res1
.a
[j
] = DEFAULT_VALUE
;
33 res2
.a
[j
] = DEFAULT_VALUE
;
34 res3
.a
[j
] = DEFAULT_VALUE
;
37 for (j
= 0; j
< 2; j
++)
40 res1
.x
= INTRINSIC (_inserti64x2
) (s1
.x
, s2
.x
, 1);
41 res2
.x
= INTRINSIC (_mask_inserti64x2
) (res2
.x
, mask
, s1
.x
, s2
.x
, 1);
42 res3
.x
= INTRINSIC (_maskz_inserti64x2
) (mask
, s1
.x
, s2
.x
, 1);
44 CALC (s1
, s2
, res_ref
, 1);
46 if (UNION_CHECK (AVX512F_LEN
, i_q
) (res1
, res_ref
))
49 MASK_MERGE (i_q
) (res_ref
, mask
, SIZE
);
50 if (UNION_CHECK (AVX512F_LEN
, i_q
) (res2
, res_ref
))
53 MASK_ZERO (i_q
) (res_ref
, mask
, SIZE
);
54 if (UNION_CHECK (AVX512F_LEN
, i_q
) (res3
, res_ref
))