Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512vl-vrsqrt14pd-1.c
blob3400276379ad714116aa5a5fec0935b9f90f07b6
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 3 } } */
4 /* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 3 } } */
5 /* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
6 /* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
7 /* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
8 /* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
10 #include <immintrin.h>
12 volatile __m256d x1;
13 volatile __m128d x2;
14 volatile __mmask8 m;
16 void extern
17 avx512vl_test (void)
19 x1 = _mm256_rsqrt14_pd (x1);
20 x1 = _mm256_mask_rsqrt14_pd (x1, m, x1);
21 x1 = _mm256_maskz_rsqrt14_pd (m, x1);
23 x2 = _mm_rsqrt14_pd (x2);
24 x2 = _mm_mask_rsqrt14_pd (x2, m, x2);
25 x2 = _mm_maskz_rsqrt14_pd (m, x2);