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_pmovsdb512_mask, "V16cV16iV16cUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsdb512mem_mask, "vV16c*V16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsdw512_mask, "V16sV16iV16sUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsdw512mem_mask, "vV16s*V16iUs","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsqb512_mask, "V16cV8LLiV16cUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsqb512mem_mask, "vV16c*V8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsqd512_mask, "V8iV8LLiV8iUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsqd512mem_mask, "vV8i*V8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsqw512_mask, "V8sV8LLiV8sUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsqw512mem_mask, "vV8s*V8LLiUc","","avx512f") +TARGET_BUILTIN(__builtin_ia32_pmovsdb128_mask, "V16cV4iV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsdb128mem_mask, "vV16c*V4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsdb256_mask, "V16cV8iV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsdb256mem_mask, "vV16c*V8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsdw128_mask, "V8sV4iV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsdw128mem_mask, "vV8s*V4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsdw256_mask, "V8sV8iV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsdw256mem_mask, "vV8s*V8iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqb128_mask, "V16cV2LLiV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqb128mem_mask, "vV16c*V2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqb256_mask, "V16cV4LLiV16cUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqb256mem_mask, "vV16c*V4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqd128_mask, "V4iV2LLiV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqd128mem_mask, "vV4i*V2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqd256_mask, "V4iV4LLiV4iUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqd256mem_mask, "vV4i*V4LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqw128_mask, "V8sV2LLiV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqw128mem_mask, "vV8s*V2LLiUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqw256_mask, "V8sV4LLiV8sUc","","avx512vl") +TARGET_BUILTIN(__builtin_ia32_pmovsqw256mem_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,162 @@ __R);\ }) +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_cvtsepi32_epi8 (__m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb512_mask ((__v16si) __A, + (__v16qi) + _mm_undefined_si128 (), + (__mmask16) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi32_epi8 (__m128i __O, __mmask16 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb512_mask ((__v16si) __A, + (__v16qi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtsepi32_epi8 (__mmask16 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb512_mask ((__v16si) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi32_storeu_epi8 (void * __P, __mmask16 __M, __m512i __A) +{ + __builtin_ia32_pmovsdb512mem_mask ((__v16qi *) __P, (__v16si) __A, __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_cvtsepi32_epi16 (__m512i __A) +{ + return (__m256i) __builtin_ia32_pmovsdw512_mask ((__v16si) __A, + (__v16hi) + _mm256_undefined_si256 (), + (__mmask16) -1); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi32_epi16 (__m256i __O, __mmask16 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovsdw512_mask ((__v16si) __A, + (__v16hi) __O, __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtsepi32_epi16 (__mmask16 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovsdw512_mask ((__v16si) __A, + (__v16hi) + _mm256_setzero_si256 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi32_storeu_epi16 (void *__P, __mmask16 __M, __m512i __A) +{ + __builtin_ia32_pmovsdw512mem_mask ((__v16hi*) __P, (__v16si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_cvtsepi64_epi8 (__m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb512_mask ((__v8di) __A, + (__v16qi) + _mm_undefined_si128 (), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi64_epi8 (__m128i __O, __mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb512_mask ((__v8di) __A, + (__v16qi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtsepi64_epi8 (__mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb512_mask ((__v8di) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi64_storeu_epi8 (void * __P, __mmask8 __M, __m512i __A) +{ + __builtin_ia32_pmovsqb512mem_mask ((__v16qi *) __P, (__v8di) __A, __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_cvtsepi64_epi32 (__m512i __A) +{ + __v8si __O; + return (__m256i) __builtin_ia32_pmovsqd512_mask ((__v8di) __A, + (__v8si) + _mm256_undefined_si256 (), + (__mmask8) -1); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi64_epi32 (__m256i __O, __mmask8 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovsqd512_mask ((__v8di) __A, + (__v8si) __O, __M); +} + +static __inline__ __m256i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtsepi64_epi32 (__mmask8 __M, __m512i __A) +{ + return (__m256i) __builtin_ia32_pmovsqd512_mask ((__v8di) __A, + (__v8si) + _mm256_setzero_si256 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi64_storeu_epi32 (void *__P, __mmask8 __M, __m512i __A) +{ + __builtin_ia32_pmovsqd512mem_mask ((__v8si *) __P, (__v8di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_cvtsepi64_epi16 (__m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw512_mask ((__v8di) __A, + (__v8hi) + _mm_undefined_si128 (), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi64_epi16 (__m128i __O, __mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw512_mask ((__v8di) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm512_maskz_cvtsepi64_epi16 (__mmask8 __M, __m512i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw512_mask ((__v8di) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm512_mask_cvtsepi64_storeu_epi16 (void * __P, __mmask8 __M, __m512i __A) +{ + __builtin_ia32_pmovsqw512mem_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,308 @@ (__mmask8) __U); } +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtsepi32_epi8 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb128_mask ((__v4si) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi32_epi8 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb128_mask ((__v4si) __A, + (__v16qi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtsepi32_epi8 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb128_mask ((__v4si) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi32_storeu_epi8 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovsdb128mem_mask ((__v16qi *) __P, (__v4si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtsepi32_epi8 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb256_mask ((__v8si) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi32_epi8 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb256_mask ((__v8si) __A, + (__v16qi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtsepi32_epi8 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsdb256_mask ((__v8si) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi32_storeu_epi8 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovsdb256mem_mask ((__v16qi *) __P, (__v8si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtsepi32_epi16 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsdw128_mask ((__v4si) __A, + (__v8hi)_mm_setzero_si128 (), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi32_epi16 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsdw128_mask ((__v4si) __A, + (__v8hi)__O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtsepi32_epi16 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsdw128_mask ((__v4si) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi32_storeu_epi16 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovsdw128mem_mask ((__v8hi *) __P, (__v4si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtsepi32_epi16 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsdw256_mask ((__v8si) __A, + (__v8hi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi32_epi16 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsdw256_mask ((__v8si) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtsepi32_epi16 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsdw256_mask ((__v8si) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi32_storeu_epi16 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovsdw256mem_mask ((__v8hi *) __P, (__v8si) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtsepi64_epi8 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb128_mask ((__v2di) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi64_epi8 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb128_mask ((__v2di) __A, + (__v16qi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtsepi64_epi8 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb128_mask ((__v2di) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi64_storeu_epi8 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovsqb128mem_mask ((__v16qi *) __P, (__v2di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtsepi64_epi8 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb256_mask ((__v4di) __A, + (__v16qi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi64_epi8 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb256_mask ((__v4di) __A, + (__v16qi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtsepi64_epi8 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqb256_mask ((__v4di) __A, + (__v16qi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi64_storeu_epi8 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovsqb256mem_mask ((__v16qi *) __P, (__v4di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtsepi64_epi32 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqd128_mask ((__v2di) __A, + (__v4si)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi64_epi32 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqd128_mask ((__v2di) __A, + (__v4si) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtsepi64_epi32 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqd128_mask ((__v2di) __A, + (__v4si) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi64_storeu_epi32 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovsqd128mem_mask ((__v4si *) __P, (__v2di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtsepi64_epi32 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqd256_mask ((__v4di) __A, + (__v4si)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi64_epi32 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqd256_mask ((__v4di) __A, + (__v4si)__O, + __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtsepi64_epi32 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqd256_mask ((__v4di) __A, + (__v4si) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi64_storeu_epi32 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovsqd256mem_mask ((__v4si *) __P, (__v4di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_cvtsepi64_epi16 (__m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw128_mask ((__v2di) __A, + (__v8hi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi64_epi16 (__m128i __O, __mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw128_mask ((__v2di) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm_maskz_cvtsepi64_epi16 (__mmask8 __M, __m128i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw128_mask ((__v2di) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm_mask_cvtsepi64_storeu_epi16 (void * __P, __mmask8 __M, __m128i __A) +{ + __builtin_ia32_pmovsqw128mem_mask ((__v8hi *) __P, (__v2di) __A, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_cvtsepi64_epi16 (__m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw256_mask ((__v4di) __A, + (__v8hi)_mm_undefined_si128(), + (__mmask8) -1); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi64_epi16 (__m128i __O, __mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw256_mask ((__v4di) __A, + (__v8hi) __O, __M); +} + +static __inline__ __m128i __DEFAULT_FN_ATTRS +_mm256_maskz_cvtsepi64_epi16 (__mmask8 __M, __m256i __A) +{ + return (__m128i) __builtin_ia32_pmovsqw256_mask ((__v4di) __A, + (__v8hi) + _mm_setzero_si128 (), + __M); +} + +static __inline__ void __DEFAULT_FN_ATTRS +_mm256_mask_cvtsepi64_storeu_epi16 (void * __P, __mmask8 __M, __m256i __A) +{ + __builtin_ia32_pmovsqw256mem_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_cvtsepi32_epi8(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.512 + return _mm512_cvtsepi32_epi8(__A); +} + +__m128i test_mm512_mask_cvtsepi32_epi8(__m128i __O, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.512 + return _mm512_mask_cvtsepi32_epi8(__O, __M, __A); +} + +__m128i test_mm512_maskz_cvtsepi32_epi8(__mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.512 + return _mm512_maskz_cvtsepi32_epi8(__M, __A); +} + +void test_mm512_mask_cvtsepi32_storeu_epi8(void * __P, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi32_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.mem.512 + return _mm512_mask_cvtsepi32_storeu_epi8(__P, __M, __A); +} + +__m256i test_mm512_cvtsepi32_epi16(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.512 + return _mm512_cvtsepi32_epi16(__A); +} + +__m256i test_mm512_mask_cvtsepi32_epi16(__m256i __O, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.512 + return _mm512_mask_cvtsepi32_epi16(__O, __M, __A); +} + +__m256i test_mm512_maskz_cvtsepi32_epi16(__mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.512 + return _mm512_maskz_cvtsepi32_epi16(__M, __A); +} + +void test_mm512_mask_cvtsepi32_storeu_epi16(void *__P, __mmask16 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi32_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.mem.512 + return _mm512_mask_cvtsepi32_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm512_cvtsepi64_epi8(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.512 + return _mm512_cvtsepi64_epi8(__A); +} + +__m128i test_mm512_mask_cvtsepi64_epi8(__m128i __O, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.512 + return _mm512_mask_cvtsepi64_epi8(__O, __M, __A); +} +__m128i test_mm512_maskz_cvtsepi64_epi8(__mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.512 + return _mm512_maskz_cvtsepi64_epi8(__M, __A); +} + +void test_mm512_mask_cvtsepi64_storeu_epi8(void * __P, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi64_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.mem.512 + return _mm512_mask_cvtsepi64_storeu_epi8(__P, __M, __A); +} + +__m256i test_mm512_cvtsepi64_epi32(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.512 + return _mm512_cvtsepi64_epi32(__A); +} + +__m256i test_mm512_mask_cvtsepi64_epi32(__m256i __O, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.512 + return _mm512_mask_cvtsepi64_epi32(__O, __M, __A); +} + +__m256i test_mm512_maskz_cvtsepi64_epi32(__mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.512 + return _mm512_maskz_cvtsepi64_epi32(__M, __A); +} + +void test_mm512_mask_cvtsepi64_storeu_epi32(void *__P, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi64_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.mem.512 + return _mm512_mask_cvtsepi64_storeu_epi32(__P, __M, __A); +} + +__m128i test_mm512_cvtsepi64_epi16(__m512i __A) { + // CHECK-LABEL: @test_mm512_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.512 + return _mm512_cvtsepi64_epi16(__A); +} + +__m128i test_mm512_mask_cvtsepi64_epi16(__m128i __O, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.512 + return _mm512_mask_cvtsepi64_epi16(__O, __M, __A); +} + +__m128i test_mm512_maskz_cvtsepi64_epi16(__mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_maskz_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.512 + return _mm512_maskz_cvtsepi64_epi16(__M, __A); +} + +void test_mm512_mask_cvtsepi64_storeu_epi16(void * __P, __mmask8 __M, __m512i __A) { + // CHECK-LABEL: @test_mm512_mask_cvtsepi64_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.mem.512 + return _mm512_mask_cvtsepi64_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_cvtsepi32_epi8(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.128 + return _mm_cvtsepi32_epi8(__A); +} + +__m128i test_mm_mask_cvtsepi32_epi8(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.128 + return _mm_mask_cvtsepi32_epi8(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtsepi32_epi8(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.128 + return _mm_maskz_cvtsepi32_epi8(__M, __A); +} + +void test_mm_mask_cvtsepi32_storeu_epi8(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi32_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.mem.128 + return _mm_mask_cvtsepi32_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm256_cvtsepi32_epi8(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.256 + return _mm256_cvtsepi32_epi8(__A); +} + +__m128i test_mm256_mask_cvtsepi32_epi8(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.256 + return _mm256_mask_cvtsepi32_epi8(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtsepi32_epi8(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtsepi32_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.256 + return _mm256_maskz_cvtsepi32_epi8(__M, __A); +} + +void test_mm256_mask_cvtsepi32_storeu_epi8(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi32_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.db.mem.256 + return _mm256_mask_cvtsepi32_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm_cvtsepi32_epi16(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.128 + return _mm_cvtsepi32_epi16(__A); +} + +__m128i test_mm_mask_cvtsepi32_epi16(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.128 + return _mm_mask_cvtsepi32_epi16(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtsepi32_epi16(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.128 + return _mm_maskz_cvtsepi32_epi16(__M, __A); +} + +void test_mm_mask_cvtsepi32_storeu_epi16(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi32_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.mem.128 + return _mm_mask_cvtsepi32_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm256_cvtsepi32_epi16(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.256 + return _mm256_cvtsepi32_epi16(__A); +} + +__m128i test_mm256_mask_cvtsepi32_epi16(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.256 + return _mm256_mask_cvtsepi32_epi16(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtsepi32_epi16(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtsepi32_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.256 + return _mm256_maskz_cvtsepi32_epi16(__M, __A); +} + +void test_mm256_mask_cvtsepi32_storeu_epi16(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi32_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.dw.mem.256 + return _mm256_mask_cvtsepi32_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm_cvtsepi64_epi8(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.128 + return _mm_cvtsepi64_epi8(__A); +} + +__m128i test_mm_mask_cvtsepi64_epi8(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.128 + return _mm_mask_cvtsepi64_epi8(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtsepi64_epi8(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.128 + return _mm_maskz_cvtsepi64_epi8(__M, __A); +} + +void test_mm_mask_cvtsepi64_storeu_epi8(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi64_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.mem.128 + return _mm_mask_cvtsepi64_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm256_cvtsepi64_epi8(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.256 + return _mm256_cvtsepi64_epi8(__A); +} + +__m128i test_mm256_mask_cvtsepi64_epi8(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.256 + return _mm256_mask_cvtsepi64_epi8(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtsepi64_epi8(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtsepi64_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.256 + return _mm256_maskz_cvtsepi64_epi8(__M, __A); +} + +void test_mm256_mask_cvtsepi64_storeu_epi8(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi64_storeu_epi8 + // CHECK: @llvm.x86.avx512.mask.pmovs.qb.mem.256 + return _mm256_mask_cvtsepi64_storeu_epi8(__P, __M, __A); +} + +__m128i test_mm_cvtsepi64_epi32(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.128 + return _mm_cvtsepi64_epi32(__A); +} + +__m128i test_mm_mask_cvtsepi64_epi32(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.128 + return _mm_mask_cvtsepi64_epi32(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtsepi64_epi32(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.128 + return _mm_maskz_cvtsepi64_epi32(__M, __A); +} + +void test_mm_mask_cvtsepi64_storeu_epi32(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi64_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.mem.128 + return _mm_mask_cvtsepi64_storeu_epi32(__P, __M, __A); +} + +__m128i test_mm256_cvtsepi64_epi32(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.256 + return _mm256_cvtsepi64_epi32(__A); +} + +__m128i test_mm256_mask_cvtsepi64_epi32(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.256 + return _mm256_mask_cvtsepi64_epi32(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtsepi64_epi32(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtsepi64_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.256 + return _mm256_maskz_cvtsepi64_epi32(__M, __A); +} + +void test_mm256_mask_cvtsepi64_storeu_epi32(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi64_storeu_epi32 + // CHECK: @llvm.x86.avx512.mask.pmovs.qd.mem.256 + return _mm256_mask_cvtsepi64_storeu_epi32(__P, __M, __A); +} + +__m128i test_mm_cvtsepi64_epi16(__m128i __A) { + // CHECK-LABEL: @test_mm_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.128 + return _mm_cvtsepi64_epi16(__A); +} + +__m128i test_mm_mask_cvtsepi64_epi16(__m128i __O, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.128 + return _mm_mask_cvtsepi64_epi16(__O, __M, __A); +} + +__m128i test_mm_maskz_cvtsepi64_epi16(__mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_maskz_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.128 + return _mm_maskz_cvtsepi64_epi16(__M, __A); +} + +void test_mm_mask_cvtsepi64_storeu_epi16(void * __P, __mmask8 __M, __m128i __A) { + // CHECK-LABEL: @test_mm_mask_cvtsepi64_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.mem.128 + return _mm_mask_cvtsepi64_storeu_epi16(__P, __M, __A); +} + +__m128i test_mm256_cvtsepi64_epi16(__m256i __A) { + // CHECK-LABEL: @test_mm256_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.256 + return _mm256_cvtsepi64_epi16(__A); +} + +__m128i test_mm256_mask_cvtsepi64_epi16(__m128i __O, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.256 + return _mm256_mask_cvtsepi64_epi16(__O, __M, __A); +} + +__m128i test_mm256_maskz_cvtsepi64_epi16(__mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_maskz_cvtsepi64_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.256 + return _mm256_maskz_cvtsepi64_epi16(__M, __A); +} + +void test_mm256_mask_cvtsepi64_storeu_epi16(void * __P, __mmask8 __M, __m256i __A) { + // CHECK-LABEL: @test_mm256_mask_cvtsepi64_storeu_epi16 + // CHECK: @llvm.x86.avx512.mask.pmovs.qw.mem.256 + return _mm256_mask_cvtsepi64_storeu_epi16(__P, __M, __A); +}