diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512vl-vpcmpd-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512vl-vpcmpd-1.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpd-1.c b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpd-1.c new file mode 100644 index 00000000000..6b0e7977a81 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512vl-vpcmpd-1.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mavx512vl" } */ +/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[1-7\](?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[1-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[1-7\](?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[1-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */ + +#include <immintrin.h> + +volatile __m256i x; +volatile __m128i xx; +volatile __mmask8 m; + +void extern +avx512vl_test (void) +{ + m = _mm256_cmp_epi32_mask (x, x, _MM_CMPINT_EQ); + m = _mm256_mask_cmp_epi32_mask (m, x, x, _MM_CMPINT_EQ); + m = _mm_cmp_epi32_mask (xx, xx, _MM_CMPINT_EQ); + m = _mm_mask_cmp_epi32_mask (m, xx, xx, _MM_CMPINT_EQ); +} |