1 /* { dg-do compile } */
2 /* { dg-options "-mavx512fp16 -O2" } */
3 /* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
4 /* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
5 /* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
6 /* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
7 /* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
8 /* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
9
10 #include <immintrin.h>
11
12 volatile __m512h res, res1, res2;
13 volatile __m512h x1, x2, x3;
14 volatile __mmask16 m16;
15
16 void extern
17 avx512f_test (void)
18 {
19 res = _mm512_fmul_pch (x1, x2);
20 res1 = _mm512_mask_fmul_pch (res1, m16, x1, x2);
21 res2 = _mm512_maskz_fmul_pch (m16, x1, x2);
22 res = _mm512_fmul_round_pch (x1, x2, 8);
23 res1 = _mm512_mask_fmul_round_pch (res1, m16, x1, x2, 8);
24 res2 = _mm512_maskz_fmul_round_pch (m16, x1, x2, 11);
25
26 res = _mm512_mul_pch (x1, x2);
27 res1 = _mm512_mask_mul_pch (res1, m16, x1, x2);
28 res2 = _mm512_maskz_mul_pch (m16, x1, x2);
29 res = _mm512_mul_round_pch (x1, x2, 8);
30 res1 = _mm512_mask_mul_round_pch (res1, m16, x1, x2, 8);
31 res2 = _mm512_maskz_mul_round_pch (m16, x1, x2, 11);
32 }