1 /* { dg-do compile } */
2 /* { dg-options "-mavx512fp16 -O2" } */
3 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
6 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
8 
9 #include <immintrin.h>
10 
11 volatile __m512h res;
12 volatile __m512i x1;
13 volatile __mmask32 m32;
14 
15 void extern
avx512f_test(void)16 avx512f_test (void)
17 {
18   res = _mm512_cvtepi16_ph (x1);
19   res = _mm512_mask_cvtepi16_ph (res, m32, x1);
20   res = _mm512_maskz_cvtepi16_ph (m32, x1);
21   res = _mm512_cvt_roundepi16_ph (x1, 4);
22   res = _mm512_mask_cvt_roundepi16_ph (res, m32, x1, 8);
23   res = _mm512_maskz_cvt_roundepi16_ph (m32, x1, 11);
24 }
25