Initial support for AVX-512{VL,BW,DQ}
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512dq-vrangepd-1.c
blob45f7b27dcc819b3abc3d53c0f3aabc7b12220cb3
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512dq -mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]" 3 } } */
4 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
5 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 3 } } */
6 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 3 } } */
7 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
8 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
9 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
10 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
11 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
12 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
13 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
14 /* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
16 #include <immintrin.h>
18 volatile __m512d z;
19 volatile __m256d y;
20 volatile __m128d x;
21 volatile __mmask8 m;
23 void extern
24 avx512dq_test (void)
26 z = _mm512_range_round_pd (z, z, 15, _MM_FROUND_NO_EXC);
27 z = _mm512_range_pd (z, z, 15);
28 y = _mm256_range_pd (y, y, 15);
29 x = _mm_range_pd (x, x, 15);
31 z = _mm512_mask_range_round_pd (z, m, z, z, 15, _MM_FROUND_NO_EXC);
32 z = _mm512_mask_range_pd (z, m, z, z, 15);
33 y = _mm256_mask_range_pd (y, m, y, y, 15);
34 x = _mm_mask_range_pd (x, m, x, x, 15);
36 z = _mm512_maskz_range_round_pd (m, z, z, 15, _MM_FROUND_NO_EXC);
37 z = _mm512_maskz_range_pd (m, z, z, 15);
38 y = _mm256_maskz_range_pd (m, y, y, 15);
39 x = _mm_maskz_range_pd (m, x, x, 15);