Initial support for AVX-512{VL,BW,DQ}
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bw-vpermi2w-1.c
blob275fef47c2a310412ecad1f78a017202c1097bb1
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vpermi2w\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
4 /* { dg-final { scan-assembler-times "vpermi2w\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
5 /* { dg-final { scan-assembler-times "vpermi2w\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
7 #include <immintrin.h>
9 volatile __m512i x3;
10 volatile __m256i x2;
11 volatile __m128i x1;
12 volatile __m512i z;
13 volatile __m256i y;
14 volatile __m128i x;
15 volatile __mmask32 m3;
16 volatile __mmask16 m2;
17 volatile __mmask8 m1;
19 void extern
20 avx512bw_test (void)
22 x3 = _mm512_mask2_permutex2var_epi16 (x3, z, m3, x3);
23 x2 = _mm256_mask2_permutex2var_epi16 (x2, y, m2, x2);
24 x1 = _mm_mask2_permutex2var_epi16 (x1, x, m1, x1);