]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/i386/avx512bf16-vcvtneps2bf16-1.c
Enable support for bfloat16 which will be in Future Cooper Lake.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / i386 / avx512bf16-vcvtneps2bf16-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bf16 -O2" } */
3 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
5 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
6
7 #include <immintrin.h>
8
9 volatile __m256bh res;
10 volatile __m512 x1;
11 volatile __mmask16 m16;
12
13 void extern
14 avx512bf16_test (void)
15 {
16 res = _mm512_cvtneps_pbh (x1);
17 res = _mm512_mask_cvtneps_pbh (res, m16, x1);
18 res = _mm512_maskz_cvtneps_pbh (m16, x1);
19 }