Initial support for AVX-512{VL,BW,DQ}
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512vl-vcvtpd2udq-1.c
blob7544b6bc9cac838cbe4cc586ba658b3033342b3c
1 /* { dg-do compile } */
2 /* { dg-options "-mavx512vl -O2" } */
3 /* { dg-final { scan-assembler-times "vcvtpd2udqy\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
4 /* { dg-final { scan-assembler-times "vcvtpd2udqx\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
5 /* { dg-final { scan-assembler-times "vcvtpd2udqy\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
6 /* { dg-final { scan-assembler-times "vcvtpd2udqx\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
7 /* { dg-final { scan-assembler-times "vcvtpd2udqy\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
8 /* { dg-final { scan-assembler-times "vcvtpd2udqx\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
10 #include <immintrin.h>
12 volatile __m256d s1;
13 volatile __m128d s2;
14 volatile __m128i res;
15 volatile __mmask8 m;
17 void extern
18 avx512vl_test (void)
20 res = _mm256_cvtpd_epu32 (s1);
21 res = _mm_cvtpd_epu32 (s2);
23 res = _mm256_mask_cvtpd_epu32 (res, m, s1);
24 res = _mm_mask_cvtpd_epu32 (res, m, s2);
26 res = _mm256_maskz_cvtpd_epu32 (m, s1);
27 res = _mm_maskz_cvtpd_epu32 (m, s2);