Initial support for AVX-512{VL,BW,DQ}
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bw-kunpckdq-1.c
blob16fce46f8e1105281884535635109584f569cb49
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -O2" } */
3 /* { dg-final { scan-assembler-times "kunpckdq\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
5 #include <immintrin.h>
7 void
8 avx512bw_test () {
9 __mmask64 k1, k2, k3;
10 volatile __m512i x;
12 __asm__( "kmovq %1, %0" : "=k" (k1) : "r" (1) );
13 __asm__( "kmovq %1, %0" : "=k" (k2) : "r" (2) );
15 k3 = _mm512_kunpackd (k1, k2);
16 x = _mm512_mask_avg_epu8 (x, k3, x, x);