1 /* { dg-do compile } */
2 /* { dg-options "-mavx512dq -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
4 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
5 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
6 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
7 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
8 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
10 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
11 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
12 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
13 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
14 /* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
15
16 #include <immintrin.h>
17
18 volatile __m512i x1;
19 volatile __m256i x2;
20 volatile __m128i x3;
21 volatile __m256 z1;
22 volatile __m128 z2;
23 volatile __mmask8 m;
24
25 void extern
avx512dq_test(void)26 avx512dq_test (void)
27 {
28 x1 = _mm512_cvtps_epi64 (z1);
29 x1 = _mm512_mask_cvtps_epi64 (x1, m, z1);
30 x1 = _mm512_maskz_cvtps_epi64 (m, z1);
31 x2 = _mm256_cvtps_epi64 (z2);
32 x2 = _mm256_mask_cvtps_epi64 (x2, m, z2);
33 x2 = _mm256_maskz_cvtps_epi64 (m, z2);
34 x3 = _mm_cvtps_epi64 (z2);
35 x3 = _mm_mask_cvtps_epi64 (x3, m, z2);
36 x3 = _mm_maskz_cvtps_epi64 (m, z2);
37 x1 = _mm512_cvt_roundps_epi64 (z1, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
38 x1 = _mm512_mask_cvt_roundps_epi64 (x1, m, z1, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
39 x1 = _mm512_maskz_cvt_roundps_epi64 (m, z1, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
40 }
41