Add AVX512 k-mask intrinsics
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bw-kxorq-1.c
blobabf4280965168c9738b04fa8cd12999c9a404d69
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bw -O2" } */
3 /* { dg-final { scan-assembler-times "kxorq\[ \\t\]+\[^\{\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
5 #include <immintrin.h>
7 void
8 avx512bw_test ()
10 __mmask64 k1, k2, k3;
11 volatile __m512i x = _mm512_setzero_si512 ();
13 __asm__( "kmovq %1, %0" : "=k" (k1) : "r" (1) );
14 __asm__( "kmovq %1, %0" : "=k" (k2) : "r" (2) );
16 k3 = _kxor_mask64 (k1, k2);
17 x = _mm512_mask_add_epi8 (x, k3, x, x);