1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx512bw -mavx512vl" } */
3 /* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
4 /* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
10 
11 #include <immintrin.h>
12 
13 volatile __m512i x512;
14 volatile __m256i x256;
15 volatile __m128i x128;
16 volatile __mmask64 m512;
17 volatile __mmask32 m256;
18 volatile __mmask16 m128;
19 
20 void extern
avx512bw_test(void)21 avx512bw_test (void)
22 {
23   x512 = _mm512_sub_epi8 (x512, x512);
24   x512 = _mm512_mask_sub_epi8 (x512, m512, x512, x512);
25   x512 = _mm512_maskz_sub_epi8 (m512, x512, x512);
26   x256 = _mm256_mask_sub_epi8 (x256, m256, x256, x256);
27   x256 = _mm256_maskz_sub_epi8 (m256, x256, x256);
28   x128 = _mm_mask_sub_epi8 (x128, m128, x128, x128);
29   x128 = _mm_maskz_sub_epi8 (m128, x128, x128);
30 }
31