Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512fp16-vcvtudq2ph-1a.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512fp16 -O2" } */
3 /* { dg-final { scan-assembler-times "vcvtudq2ph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
4 /* { dg-final { scan-assembler-times "vcvtudq2ph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vcvtudq2ph\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vcvtudq2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vcvtudq2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
8
9 #include <immintrin.h>
10
11 volatile __m256h res, res1, res2;
12 volatile __m512i x1, x2, x3;
13 volatile __mmask16 m16;
14
15 void extern
16 avx512f_test (void)
17 {
18 res = _mm512_cvtepu32_ph (x1);
19 res1 = _mm512_mask_cvtepu32_ph (res, m16, x2);
20 res2 = _mm512_maskz_cvtepu32_ph (m16, x3);
21 res = _mm512_cvt_roundepu32_ph (x1, 4);
22 res1 = _mm512_mask_cvt_roundepu32_ph (res, m16, x2, 8);
23 res2 = _mm512_maskz_cvt_roundepu32_ph (m16, x3, 11);
24 }