| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mavx512fp16 -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */ |
| 4 |
/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| 5 |
/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| 6 |
/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| 7 |
/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */ |
| 8 |
|
| 9 |
#include <immintrin.h> |
| 10 |
|
| 11 |
volatile __m512i res, res1, res2; |
| 12 |
volatile __m128h x1, x2, x3; |
| 13 |
volatile __mmask8 m8; |
| 14 |
|
| 15 |
void extern |
| 16 |
avx512f_test (void) |
| 17 |
{ |
| 18 |
res = _mm512_cvttph_epi64 (x1); |
| 19 |
res1 = _mm512_mask_cvttph_epi64 (res, m8, x2); |
| 20 |
res2 = _mm512_maskz_cvttph_epi64 (m8, x3); |
| 21 |
res = _mm512_cvtt_roundph_epi64 (x1, 4); |
| 22 |
res1 = _mm512_mask_cvtt_roundph_epi64 (res, m8, x2, 8); |
| 23 |
res2 = _mm512_maskz_cvtt_roundph_epi64 (m8, x3, 8); |
| 24 |
} |