2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bw-vpminub-1.c
blob0dd7d85587e346c33f8ccc9e3ad045c8f8f13c19
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vpminub\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vpminub\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vpminub\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vpminub\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vpminub\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vpminub\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vpminub\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
11 #include <immintrin.h>
13 volatile __m512i x;
14 volatile __m256i y;
15 volatile __m128i z;
16 volatile __mmask32 mx;
17 volatile __mmask16 my;
18 volatile __mmask8 mz;
20 void extern
21 avx512bw_test (void)
23 x = _mm512_min_epu8 (x, x);
24 x = _mm512_mask_min_epu8 (x, mx, x, x);
25 x = _mm512_maskz_min_epu8 (mx, x, x);
26 y = _mm256_mask_min_epu8 (y, my, y, y);
27 y = _mm256_maskz_min_epu8 (my, y, y);
28 z = _mm_mask_min_epu8 (z, mz, z, z);
29 z = _mm_maskz_min_epu8 (mz, z, z);