1 /* { dg-do compile } */
2 /* { dg-options "-mavx512bf16 -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vcvtneps2bf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
9 
10 #include <immintrin.h>
11 
12 volatile __m128bh res1, res2;
13 volatile __m128 x1;
14 volatile __m256 x2;
15 volatile __mmask8 m8;
16 
17 void extern
avx512bf16_test(void)18 avx512bf16_test (void)
19 {
20   res2 = _mm256_cvtneps_pbh (x2);
21   res2 = _mm256_mask_cvtneps_pbh (res2, m8, x2);
22   res2 = _mm256_maskz_cvtneps_pbh (m8, x2);
23 
24   res1 = _mm_cvtneps_pbh (x1);
25   res1 = _mm_mask_cvtneps_pbh (res1, m8, x1);
26   res1 = _mm_maskz_cvtneps_pbh (m8, x1);
27 }
28