Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512fp16vl-vcvtw2ph-1a.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512fp16 -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+%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 __m256h res2;
13 volatile __m128h res3;
14 volatile __m256i x2;
15 volatile __m128i x3;
16 volatile __mmask16 m16;
17 volatile __mmask8 m8;
18
19 void extern
20 avx512f_test (void)
21 {
22 res2 = _mm256_cvtepi16_ph (x2);
23 res2 = _mm256_mask_cvtepi16_ph (res2, m16, x2);
24 res2 = _mm256_maskz_cvtepi16_ph (m16, x2);
25
26 res3 = _mm_cvtepi16_ph (x3);
27 res3 = _mm_mask_cvtepi16_ph (res3, m8, x3);
28 res3 = _mm_maskz_cvtepi16_ph (m8, x3);
29 }