2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bw-vpaddusw-1.c
blobc259f327cd64d52caa1852b5d09f73ebd8896f3b
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx512bw -mavx512vl" } */
3 /* { dg-final { scan-assembler-times "vpaddusw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vpaddusw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpaddusw\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vpaddusw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vpaddusw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vpaddusw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vpaddusw\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
11 #include <immintrin.h>
13 volatile __m512i x512;
14 volatile __m256i x256;
15 volatile __m128i x128;
16 volatile __mmask32 m512;
17 volatile __mmask16 m256;
18 volatile __mmask8 m128;
20 void extern
21 avx512bw_test (void)
23 x512 = _mm512_adds_epu16 (x512, x512);
24 x512 = _mm512_mask_adds_epu16 (x512, m512, x512, x512);
25 x512 = _mm512_maskz_adds_epu16 (m512, x512, x512);
26 x256 = _mm256_mask_adds_epu16 (x256, m256, x256, x256);
27 x256 = _mm256_maskz_adds_epu16 (m256, x256, x256);
28 x128 = _mm_mask_adds_epu16 (x128, m128, x128, x128);
29 x128 = _mm_maskz_adds_epu16 (m128, x128, x128);