diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c new file mode 100644 index 00000000000..a8f8f10b6be --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512f -O2" } */ +/* { dg-final { scan-assembler-times "knotw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */ + +#include <immintrin.h> + +void +avx512f_test () +{ + __mmask16 k1, k2; + volatile __m512 x; + + __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (45) ); + + k2 = _mm512_knot (k1); + + x = _mm512_mask_add_ps (x, k1, x, x); + x = _mm512_mask_add_ps (x, k2, x, x); +} |