1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */
12 #include <immintrin.h>
17 volatile __mmask64 mx
;
18 volatile __mmask32 my
;
19 volatile __mmask16 mz
;
24 x
= _mm512_packs_epi32 (x
, x
);
25 x
= _mm512_mask_packs_epi32 (x
, mx
, x
, x
);
26 x
= _mm512_maskz_packs_epi32 (mx
, x
, x
);
27 y
= _mm256_mask_packs_epi32 (y
, my
, y
, y
);
28 y
= _mm256_maskz_packs_epi32 (my
, y
, y
);
29 z
= _mm_mask_packs_epi32 (z
, mz
, z
, z
);
30 z
= _mm_maskz_packs_epi32 (mz
, z
, z
);