1 /* { dg-do compile } */
2 /* { dg-options "-mavx512dq -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
4 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
5 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
6 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
7 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)"  1 } } */
8 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
9 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
10 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
11 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)"  1 } } */
12 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
13 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
14 /* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
15 
16 #include <immintrin.h>
17 
18 volatile __m512 z;
19 volatile __m256 y;
20 volatile __m128 x;
21 volatile __mmask8 m8;
22 volatile __mmask16 m16;
23 
24 void extern
avx512dq_test(void)25 avx512dq_test (void)
26 {
27   z = _mm512_range_round_ps (z, z, 15, _MM_FROUND_NO_EXC);
28   z = _mm512_range_ps (z, z, 15);
29   y = _mm256_range_ps (y, y, 15);
30   x = _mm_range_ps (x, x, 15);
31 
32   z = _mm512_mask_range_round_ps (z, m16, z, z, 15, _MM_FROUND_NO_EXC);
33   z = _mm512_mask_range_ps (z, m16, z, z, 15);
34   y = _mm256_mask_range_ps (y, m8, y, y, 15);
35   x = _mm_mask_range_ps (x, m8, x, x, 15);
36 
37   z = _mm512_maskz_range_round_ps (m16, z, z, 15, _MM_FROUND_NO_EXC);
38   z = _mm512_maskz_range_ps (m16, z, z, 15);
39   y = _mm256_maskz_range_ps (m8, y, y, 15);
40   x = _mm_maskz_range_ps (m8, x, x, 15);
41 }
42