Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512vl-vpmovsqw-1.c
blobcca0d09a983543da9bc8216325bcbc42c4987b9a
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\[\\n\]" 1 } } */
4 /* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
5 /* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}{z}" 1 } } */
6 /* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%xmm\[0-9\]\[\\n\]" 1 } } */
7 /* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
8 /* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}{z}" 1 } } */
10 #include <immintrin.h>
12 volatile __m128i x, z;
13 volatile __m256i y;
14 volatile __mmask8 m;
16 void extern
17 avx512vl_test (void)
19 z = _mm_cvtsepi64_epi16 (x);
20 z = _mm_mask_cvtsepi64_epi16 (z, m, x);
21 z = _mm_maskz_cvtsepi64_epi16 (m, x);
22 z = _mm256_cvtsepi64_epi16 (y);
23 z = _mm256_mask_cvtsepi64_epi16 (z, m, y);
24 z = _mm256_maskz_cvtsepi64_epi16 (m, y);