diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512bw-vpackssdw-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512bw-vpackssdw-1.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpackssdw-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpackssdw-1.c new file mode 100644 index 00000000000..70bef644d52 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpackssdw-1.c @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512bw -mavx512vl -O2" } */ +/* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpackssdw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */ + + +#include <immintrin.h> + +volatile __m512i x; +volatile __m256i y; +volatile __m128i z; +volatile __mmask64 mx; +volatile __mmask32 my; +volatile __mmask16 mz; + +void extern +avx512bw_test (void) +{ + x = _mm512_packs_epi32 (x, x); + x = _mm512_mask_packs_epi32 (x, mx, x, x); + x = _mm512_maskz_packs_epi32 (mx, x, x); + y = _mm256_mask_packs_epi32 (y, my, y, y); + y = _mm256_maskz_packs_epi32 (my, y, y); + z = _mm_mask_packs_epi32 (z, mz, z, z); + z = _mm_maskz_packs_epi32 (mz, z, z); +} |