diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512bw-vpmulhrsw-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512bw-vpmulhrsw-1.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-vpmulhrsw-1.c b/gcc/testsuite/gcc.target/i386/avx512bw-vpmulhrsw-1.c new file mode 100644 index 00000000000..1feef121a29 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512bw-vpmulhrsw-1.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512bw -mavx512vl -O2" } */ +/* { dg-final { scan-assembler-times "vpmulhrsw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmulhrsw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmulhrsw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmulhrsw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmulhrsw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmulhrsw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpmulhrsw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include <immintrin.h> + +volatile __m512i x, y, z; +volatile __m256i xq, yq, zq; +volatile __m128i xw, yw, zw; + +void extern +avx512bw_test (void) +{ + x = _mm512_mulhrs_epi16 (y, z); + x = _mm512_mask_mulhrs_epi16 (x, 2, y, z); + x = _mm512_maskz_mulhrs_epi16 (2, y, z); + xq = _mm256_mask_mulhrs_epi16 (xq, 2, yq, zq); + xq = _mm256_maskz_mulhrs_epi16 (2, yq, zq); + xw = _mm_mask_mulhrs_epi16 (xw, 2, yw, zw); + xw = _mm_maskz_mulhrs_epi16 (2, yw, zw); +} |