Index: include/clang/Basic/BuiltinsX86.def =================================================================== --- include/clang/Basic/BuiltinsX86.def +++ include/clang/Basic/BuiltinsX86.def @@ -1962,6 +1962,36 @@ TARGET_BUILTIN(__builtin_ia32_rsqrt14pd256_mask, "V4dV4dV4dUc","","avx512vl") TARGET_BUILTIN(__builtin_ia32_rsqrt14ps128_mask, "V4fV4fV4fUc","","avx512vl") TARGET_BUILTIN(__builtin_ia32_rsqrt14ps256_mask, "V8fV8fV8fUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdb512_mask, "V16cV16iV16cUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusdb512mem_mask, "vV16c*V16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusdw512_mask, "V16sV16iV16sUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusdw512mem_mask, "vV16s*V16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusqb512_mask, "V16cV8LLiV16cUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusqb512mem_mask, "vV16c*V8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusqd512_mask, "V8iV8LLiV8iUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusqd512mem_mask, "vV8i*V8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusqw512_mask, "V8sV8LLiV8sUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusqw512mem_mask, "vV8s*V8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovusdb128_mask, "V16cV4iV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdb128mem_mask, "vV16c*V4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdb256_mask, "V16cV8iV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdb256mem_mask, "vV16c*V8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdw128_mask, "V8sV4iV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdw128mem_mask, "vV8s*V4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdw256_mask, "V8sV8iV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusdw256mem_mask, "vV8s*V8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqb128_mask, "V16cV2LLiV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqb128mem_mask, "vV16c*V2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqb256_mask, "V16cV4LLiV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqb256mem_mask, "vV16c*V4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqd128_mask, "V4iV2LLiV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqd128mem_mask, "vV4i*V2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqd256_mask, "V4iV4LLiV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqd256mem_mask, "vV4i*V4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqw128_mask, "V8sV2LLiV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqw128mem_mask, "vV8s*V2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqw256_mask, "V8sV4LLiV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovusqw256mem_mask, "vV8s*V4LLiUc","","avx512vl") #undef BUILTIN #undef TARGET_BUILTIN Index: lib/Headers/avx512fintrin.h =================================================================== --- lib/Headers/avx512fintrin.h +++ lib/Headers/avx512fintrin.h @@ -5619,6 +5619,164 @@ __R);\ }) +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_cvtusepi32_epi8 (__m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb512_mask ((__v16si) __A, + (__v16qi) + _mm_undefined_si128 (), + (__mmask16) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi32_epi8 (__m128i __O, __mmask16 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb512_mask ((__v16si) __A, + (__v16qi) __O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtusepi32_epi8 (__mmask16 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb512_mask ((__v16si) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi32_storeu_epi8 (void * __P, __mmask16 __M, __m512i __A) +{ + __builtin_ia32_pmovusdb512mem_mask ((__v16qi *) __P, (__v16si) __A, __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_cvtusepi32_epi16 (__m512i __A) +{ + return (__m256i) __builtin_ia32_pmovusdw512_mask ((__v16si) __A, + (__v16hi) + _mm256_undefined_si256 (), + (__mmask16) -1); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi32_epi16 (__m256i __O, __mmask16 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovusdw512_mask ((__v16si) __A, + (__v16hi) __O, + __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtusepi32_epi16 (__mmask16 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovusdw512_mask ((__v16si) __A, + (__v16hi) + _mm256_setzero_si256 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi32_storeu_epi16 (void *__P, __mmask16 __M, __m512i __A) +{ + __builtin_ia32_pmovusdw512mem_mask ((__v16hi*) __P, (__v16si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_cvtusepi64_epi8 (__m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb512_mask ((__v8di) __A, + (__v16qi) + _mm_undefined_si128 (), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi64_epi8 (__m128i __O, __mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb512_mask ((__v8di) __A, + (__v16qi) __O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtusepi64_epi8 (__mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb512_mask ((__v8di) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi64_storeu_epi8 (void * __P, __mmask8 __M, __m512i __A) +{ + __builtin_ia32_pmovusqb512mem_mask ((__v16qi *) __P, (__v8di) __A, __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_cvtusepi64_epi32 (__m512i __A) +{ + return (__m256i) __builtin_ia32_pmovusqd512_mask ((__v8di) __A, + (__v8si) + _mm256_undefined_si256 (), + (__mmask8) -1); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi64_epi32 (__m256i __O, __mmask8 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovusqd512_mask ((__v8di) __A, + (__v8si) __O, __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtusepi64_epi32 (__mmask8 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovusqd512_mask ((__v8di) __A, + (__v8si) + _mm256_setzero_si256 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi64_storeu_epi32 (void* __P, __mmask8 __M, __m512i __A) +{ + __builtin_ia32_pmovusqd512mem_mask ((__v8si*) __P, (__v8di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_cvtusepi64_epi16 (__m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw512_mask ((__v8di) __A, + (__v8hi) + _mm_undefined_si128 (), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi64_epi16 (__m128i __O, __mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw512_mask ((__v8di) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtusepi64_epi16 (__mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw512_mask ((__v8di) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtusepi64_storeu_epi16 (void *__P, __mmask8 __M, __m512i __A) +{ + __builtin_ia32_pmovusqw512mem_mask ((__v8hi*) __P, (__v8di) __A, __M); +} + #undef __DEFAULT_FN_ATTRS #endif // __AVX512FINTRIN_H Index: lib/Headers/avx512vlintrin.h =================================================================== --- lib/Headers/avx512vlintrin.h +++ lib/Headers/avx512vlintrin.h @@ -7765,6 +7765,310 @@ (__mmask8) __U); } +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtusepi32_epi8 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb128_mask ((__v4si) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi32_epi8 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb128_mask ((__v4si) __A, + (__v16qi) __O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtusepi32_epi8 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb128_mask ((__v4si) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi32_storeu_epi8 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovusdb128mem_mask ((__v16qi *) __P, (__v4si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtusepi32_epi8 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb256_mask ((__v8si) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi32_epi8 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb256_mask ((__v8si) __A, + (__v16qi) __O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtusepi32_epi8 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusdb256_mask ((__v8si) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi32_storeu_epi8 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovusdb256mem_mask ((__v16qi*) __P, (__v8si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtusepi32_epi16 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusdw128_mask ((__v4si) __A, + (__v8hi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi32_epi16 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusdw128_mask ((__v4si) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtusepi32_epi16 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusdw128_mask ((__v4si) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi32_storeu_epi16 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovusdw128mem_mask ((__v8hi *) __P, (__v4si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtusepi32_epi16 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusdw256_mask ((__v8si) __A, + (__v8hi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi32_epi16 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusdw256_mask ((__v8si) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtusepi32_epi16 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusdw256_mask ((__v8si) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi32_storeu_epi16 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovusdw256mem_mask ((__v8hi *) __P, (__v8si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtusepi64_epi8 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb128_mask ((__v2di) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi64_epi8 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb128_mask ((__v2di) __A, + (__v16qi) __O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtusepi64_epi8 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb128_mask ((__v2di) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi64_storeu_epi8 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovusqb128mem_mask ((__v16qi *) __P, (__v2di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtusepi64_epi8 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb256_mask ((__v4di) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi64_epi8 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb256_mask ((__v4di) __A, + (__v16qi) __O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtusepi64_epi8 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqb256_mask ((__v4di) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi64_storeu_epi8 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovusqb256mem_mask ((__v16qi *) __P, (__v4di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtusepi64_epi32 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqd128_mask ((__v2di) __A, + (__v4si)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi64_epi32 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqd128_mask ((__v2di) __A, + (__v4si) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtusepi64_epi32 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqd128_mask ((__v2di) __A, + (__v4si) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi64_storeu_epi32 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovusqd128mem_mask ((__v4si *) __P, (__v2di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtusepi64_epi32 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqd256_mask ((__v4di) __A, + (__v4si)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi64_epi32 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqd256_mask ((__v4di) __A, + (__v4si) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtusepi64_epi32 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqd256_mask ((__v4di) __A, + (__v4si) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi64_storeu_epi32 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovusqd256mem_mask ((__v4si *) __P, (__v4di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtusepi64_epi16 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw128_mask ((__v2di) __A, + (__v8hi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi64_epi16 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw128_mask ((__v2di) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtusepi64_epi16 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw128_mask ((__v2di) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtusepi64_storeu_epi16 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovusqw128mem_mask ((__v8hi *) __P, (__v2di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtusepi64_epi16 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw256_mask ((__v4di) __A, + (__v8hi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi64_epi16 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw256_mask ((__v4di) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtusepi64_epi16 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovusqw256_mask ((__v4di) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtusepi64_storeu_epi16 (void * __P, __mmask8 __M, __m256i __A) +{ + return __builtin_ia32_pmovusqw256mem_mask ((__v8hi *) __P, (__v4di) __A, __M); +} + #undef __DEFAULT_FN_ATTRS #undef __DEFAULT_FN_ATTRS_BOTH Index: test/CodeGen/avx512f-builtins.c =================================================================== --- test/CodeGen/avx512f-builtins.c +++ test/CodeGen/avx512f-builtins.c @@ -3700,4 +3700,122 @@ return _mm_maskz_sqrt_round_ss(__U,__A,__B,_MM_FROUND_CUR_DIRECTION); } +__m128i test_mm512_cvtusepi32_epi8(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.512 + return _mm512_cvtusepi32_epi8(__A); +} + +__m128i test_mm512_mask_cvtusepi32_epi8(__m128i __O, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.512 + return _mm512_mask_cvtusepi32_epi8(__O, __M, __A); +} + +__m128i test_mm512_maskz_cvtusepi32_epi8(__mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.512 + return _mm512_maskz_cvtusepi32_epi8(__M, __A); +} + +void test_mm512_mask_cvtusepi32_storeu_epi8(void * __P, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi32_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.mem.512 + return _mm512_mask_cvtusepi32_storeu_epi8(__P, __M, __A); +} + +__m256i test_mm512_cvtusepi32_epi16(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.512 + return _mm512_cvtusepi32_epi16(__A); +} + +__m256i test_mm512_mask_cvtusepi32_epi16(__m256i __O, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.512 + return _mm512_mask_cvtusepi32_epi16(__O, __M, __A); +} + +__m256i test_mm512_maskz_cvtusepi32_epi16(__mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.512 + return _mm512_maskz_cvtusepi32_epi16(__M, __A); +} + +void test_mm512_mask_cvtusepi32_storeu_epi16(void *__P, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi32_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.mem.512 + return _mm512_mask_cvtusepi32_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm512_cvtusepi64_epi8(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.512 + return _mm512_cvtusepi64_epi8(__A); +} + +__m128i test_mm512_mask_cvtusepi64_epi8(__m128i __O, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.512 + return _mm512_mask_cvtusepi64_epi8(__O, __M, __A); +} +__m128i test_mm512_maskz_cvtusepi64_epi8(__mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.512 + return _mm512_maskz_cvtusepi64_epi8(__M, __A); +} + +void test_mm512_mask_cvtusepi64_storeu_epi8(void * __P, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi64_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.mem.512 + return _mm512_mask_cvtusepi64_storeu_epi8(__P, __M, __A); +} + +__m256i test_mm512_cvtusepi64_epi32(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.512 + return _mm512_cvtusepi64_epi32(__A); +} + +__m256i test_mm512_mask_cvtusepi64_epi32(__m256i __O, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.512 + return _mm512_mask_cvtusepi64_epi32(__O, __M, __A); +} + +__m256i test_mm512_maskz_cvtusepi64_epi32(__mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.512 + return _mm512_maskz_cvtusepi64_epi32(__M, __A); +} + +void test_mm512_mask_cvtusepi64_storeu_epi32(void* __P, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi64_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.mem.512 + return _mm512_mask_cvtusepi64_storeu_epi32(__P, __M, __A); +} + +__m128i test_mm512_cvtusepi64_epi16(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.512 + return _mm512_cvtusepi64_epi16(__A); +} + +__m128i test_mm512_mask_cvtusepi64_epi16(__m128i __O, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.512 + return _mm512_mask_cvtusepi64_epi16(__O, __M, __A); +} + +__m128i test_mm512_maskz_cvtusepi64_epi16(__mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.512 + return _mm512_maskz_cvtusepi64_epi16(__M, __A); +} + +void test_mm512_mask_cvtusepi64_storeu_epi16(void *__P, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtusepi64_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.mem.512 + return _mm512_mask_cvtusepi64_storeu_epi16(__P, __M, __A); +} Index: test/CodeGen/avx512vl-builtins.c =================================================================== --- test/CodeGen/avx512vl-builtins.c +++ test/CodeGen/avx512vl-builtins.c @@ -5278,3 +5278,243 @@ // CHECK: @llvm.x86.avx512.rsqrt14.ps.256 return _mm256_maskz_rsqrt14_ps(__U, __A); } + +__m128i test_mm_cvtusepi32_epi8(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.128 + return _mm_cvtusepi32_epi8(__A); +} + +__m128i test_mm_mask_cvtusepi32_epi8(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.128 + return _mm_mask_cvtusepi32_epi8(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtusepi32_epi8(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.128 + return _mm_maskz_cvtusepi32_epi8(__M, __A); +} + +void test_mm_mask_cvtusepi32_storeu_epi8(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi32_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.mem.128 + return _mm_mask_cvtusepi32_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm256_cvtusepi32_epi8(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.256 + return _mm256_cvtusepi32_epi8(__A); +} + +__m128i test_mm256_mask_cvtusepi32_epi8(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.256 + return _mm256_mask_cvtusepi32_epi8(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtusepi32_epi8(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtusepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.256 + return _mm256_maskz_cvtusepi32_epi8(__M, __A); +} + +void test_mm256_mask_cvtusepi32_storeu_epi8(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi32_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.db.mem.256 + return _mm256_mask_cvtusepi32_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm_cvtusepi32_epi16(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.128 + return _mm_cvtusepi32_epi16(__A); +} + +__m128i test_mm_mask_cvtusepi32_epi16(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.128 + return _mm_mask_cvtusepi32_epi16(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtusepi32_epi16(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.128 + return _mm_maskz_cvtusepi32_epi16(__M, __A); +} + +void test_mm_mask_cvtusepi32_storeu_epi16(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi32_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.mem.128 + return _mm_mask_cvtusepi32_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm256_cvtusepi32_epi16(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.256 + return _mm256_cvtusepi32_epi16(__A); +} + +__m128i test_mm256_mask_cvtusepi32_epi16(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.256 + return _mm256_mask_cvtusepi32_epi16(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtusepi32_epi16(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtusepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.256 + return _mm256_maskz_cvtusepi32_epi16(__M, __A); +} + +void test_mm256_mask_cvtusepi32_storeu_epi16(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi32_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.dw.mem.256 + return _mm256_mask_cvtusepi32_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm_cvtusepi64_epi8(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.128 + return _mm_cvtusepi64_epi8(__A); +} + +__m128i test_mm_mask_cvtusepi64_epi8(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.128 + return _mm_mask_cvtusepi64_epi8(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtusepi64_epi8(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.128 + return _mm_maskz_cvtusepi64_epi8(__M, __A); +} + +void test_mm_mask_cvtusepi64_storeu_epi8(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi64_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.mem.128 + return _mm_mask_cvtusepi64_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm256_cvtusepi64_epi8(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.256 + return _mm256_cvtusepi64_epi8(__A); +} + +__m128i test_mm256_mask_cvtusepi64_epi8(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.256 + return _mm256_mask_cvtusepi64_epi8(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtusepi64_epi8(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtusepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.256 + return _mm256_maskz_cvtusepi64_epi8(__M, __A); +} + +void test_mm256_mask_cvtusepi64_storeu_epi8(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi64_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovus.qb.mem.256 + return _mm256_mask_cvtusepi64_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm_cvtusepi64_epi32(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.128 + return _mm_cvtusepi64_epi32(__A); +} + +__m128i test_mm_mask_cvtusepi64_epi32(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.128 + return _mm_mask_cvtusepi64_epi32(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtusepi64_epi32(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.128 + return _mm_maskz_cvtusepi64_epi32(__M, __A); +} + +void test_mm_mask_cvtusepi64_storeu_epi32(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi64_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.mem.128 + return _mm_mask_cvtusepi64_storeu_epi32(__P, __M, __A); +} + +__m128i test_mm256_cvtusepi64_epi32(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.256 + return _mm256_cvtusepi64_epi32(__A); +} + +__m128i test_mm256_mask_cvtusepi64_epi32(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.256 + return _mm256_mask_cvtusepi64_epi32(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtusepi64_epi32(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtusepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.256 + return _mm256_maskz_cvtusepi64_epi32(__M, __A); +} + +void test_mm256_mask_cvtusepi64_storeu_epi32(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi64_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovus.qd.mem.256 + return _mm256_mask_cvtusepi64_storeu_epi32(__P, __M, __A); +} + +__m128i test_mm_cvtusepi64_epi16(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.128 + return _mm_cvtusepi64_epi16(__A); +} + +__m128i test_mm_mask_cvtusepi64_epi16(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.128 + return _mm_mask_cvtusepi64_epi16(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtusepi64_epi16(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.128 + return _mm_maskz_cvtusepi64_epi16(__M, __A); +} + +void test_mm_mask_cvtusepi64_storeu_epi16(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtusepi64_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.mem.128 + return _mm_mask_cvtusepi64_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm256_cvtusepi64_epi16(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.256 + return _mm256_cvtusepi64_epi16(__A); +} + +__m128i test_mm256_mask_cvtusepi64_epi16(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.256 + return _mm256_mask_cvtusepi64_epi16(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtusepi64_epi16(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtusepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.256 + return _mm256_maskz_cvtusepi64_epi16(__M, __A); +} + +void test_mm256_mask_cvtusepi64_storeu_epi16(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtusepi64_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovus.qw.mem.256 + return _mm256_mask_cvtusepi64_storeu_epi16(__P, __M, __A); +}