1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx512bw -mavx512vl" } */
3 /* { dg-final { scan-assembler-times "vpcmpb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[1-7\](?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vpcmpb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n^k\]*%k\[1-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpcmpb\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[1-7\](?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vpcmpb\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[1-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vpcmpb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[1-7\](?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vpcmpb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n^k\]*%k\[1-7\]\{%k\[0-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
9 
10 #include <immintrin.h>
11 
12 volatile __m512i xq;
13 volatile __m256i x;
14 volatile __m128i xx;
15 volatile __mmask16 m;
16 volatile __mmask32 mm;
17 volatile __mmask64 mmm;
18 
19 void extern
avx512bw_test(void)20 avx512bw_test (void)
21 {
22   mmm = _mm512_cmp_epi8_mask (xq, xq, _MM_CMPINT_GE);
23   mmm = _mm512_mask_cmp_epi8_mask (m, xq, xq, _MM_CMPINT_NLE);
24   mm = _mm256_cmp_epi8_mask (x, x, _MM_CMPINT_GT);
25   mm = _mm256_mask_cmp_epi8_mask (m, x, x, _MM_CMPINT_EQ);
26   m = _mm_cmp_epi8_mask (xx, xx, _MM_CMPINT_LT);
27   m = _mm_mask_cmp_epi8_mask (m, xx, xx, _MM_CMPINT_LE);
28 }
29