summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512f-korw-1.c
blob: 96f837b96b0c4775ee99f2ac9768c8eb67d4fd28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-final { scan-assembler-times "korw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */

#include <immintrin.h>

void
avx512f_test ()
{
  __mmask16 k1, k2, k3;
  volatile __m512 x;

  __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
  __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );

  k3 = _mm512_kor (k1, k2);
  x = _mm512_mask_add_ps (x, k3, x, x);
}