r265915 - [Clang][AVX512][BuiltIn] Adding avx512 ( vperm{i|t}2var, vpermil{var}{ps|pd}{256|512} ) builtin to clang.
Michael Zuckerman via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 11 00:15:39 PDT 2016
Author: mzuckerm
Date: Mon Apr 11 02:15:34 2016
New Revision: 265915
URL: http://llvm.org/viewvc/llvm-project?rev=265915&view=rev
Log:
[Clang][AVX512][BuiltIn] Adding avx512 ( vperm{i|t}2var, vpermil{var}{ps|pd}{256|512} ) builtin to clang.
Differential Revision: http://reviews.llvm.org/D18933
Modified:
cfe/trunk/include/clang/Basic/BuiltinsX86.def
cfe/trunk/lib/Headers/avx512fintrin.h
cfe/trunk/lib/Headers/avx512vlintrin.h
cfe/trunk/test/CodeGen/avx512f-builtins.c
cfe/trunk/test/CodeGen/avx512vl-builtins.c
Modified: cfe/trunk/include/clang/Basic/BuiltinsX86.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/BuiltinsX86.def?rev=265915&r1=265914&r2=265915&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Mon Apr 11 02:15:34 2016
@@ -1848,6 +1848,26 @@ TARGET_BUILTIN(__builtin_ia32_vcvttss2si
TARGET_BUILTIN(__builtin_ia32_vcvttss2si64, "LLiV4fIi","","avx512f")
TARGET_BUILTIN(__builtin_ia32_vcvttss2usi32, "UiV4fIi","","avx512f")
TARGET_BUILTIN(__builtin_ia32_vcvttss2usi64, "ULLiV4fIi","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermi2vard512_mask, "V16iV16iV16iV16iUs","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varpd512_mask, "V8dV8dV8LLiV8dUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varps512_mask, "V16fV16fV16iV16fUs","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermi2varq512_mask, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermilpd512_mask, "V8dV8dIiV8dUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermilps512_mask, "V16fV16fIiV16fUs","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarpd512_mask, "V8dV8dV8LLiV8dUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarps512_mask, "V16fV16fV16iV16fUs","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2vard512_maskz, "V16iV16iV16iV16iUs","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varpd512_maskz, "V8dV8LLiV8dV8dUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varps512_maskz, "V16fV16iV16fV16fUs","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermt2varq512_maskz, "V8LLiV8LLiV8LLiV8LLiUc","","avx512f")
+TARGET_BUILTIN(__builtin_ia32_vpermilpd_mask, "V2dV2dIiV2dUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermilpd256_mask, "V4dV4dIiV4dUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermilps_mask, "V4fV4fIiV4fUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermilps256_mask, "V8fV8fIiV8fUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarpd_mask, "V2dV2dV2LLiV2dUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarpd256_mask, "V4dV4dV4LLiV4dUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarps_mask, "V4fV4fV4iV4fUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpermilvarps256_mask, "V8fV8fV8iV8fUc","","avx512vl")
#undef BUILTIN
#undef TARGET_BUILTIN
Modified: cfe/trunk/lib/Headers/avx512fintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512fintrin.h?rev=265915&r1=265914&r2=265915&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Mon Apr 11 02:15:34 2016
@@ -3985,6 +3985,16 @@ _mm512_mask_unpackhi_pd (__m512d __W, __
#define _mm_cvt_roundsd_si64( __A, __R) __extension__ ({ \
__builtin_ia32_vcvtsd2si64 ((__v2df)( __A),( __R));\
})
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask2_permutex2var_epi32 (__m512i __A, __m512i __I,
+ __mmask16 __U, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_vpermi2vard512_mask ((__v16si) __A,
+ (__v16si) __I
+ /* idx */ ,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
static __inline__ __m512d __DEFAULT_FN_ATTRS
_mm512_maskz_unpackhi_pd (__mmask8 __U, __m512d __A, __m512d __B)
@@ -4233,6 +4243,181 @@ _mm_cvttss_u64 (__m128 __A)
_MM_FROUND_CUR_DIRECTION);
}
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_mask2_permutex2var_pd (__m512d __A, __m512i __I, __mmask8 __U,
+ __m512d __B)
+{
+ return (__m512d) __builtin_ia32_vpermi2varpd512_mask ((__v8df) __A,
+ (__v8di) __I
+ /* idx */ ,
+ (__v8df) __B,
+ (__mmask8) __U);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_mask2_permutex2var_ps (__m512 __A, __m512i __I, __mmask16 __U,
+ __m512 __B)
+{
+ return (__m512) __builtin_ia32_vpermi2varps512_mask ((__v16sf) __A,
+ (__v16si) __I
+ /* idx */ ,
+ (__v16sf) __B,
+ (__mmask16) __U);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask2_permutex2var_epi64 (__m512i __A, __m512i __I,
+ __mmask8 __U, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_vpermi2varq512_mask ((__v8di) __A,
+ (__v8di) __I
+ /* idx */ ,
+ (__v8di) __B,
+ (__mmask8) __U);
+}
+
+#define _mm512_permute_pd( __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilpd512_mask ((__v8df)( __X),( __C),\
+ (__v8df)\
+ _mm512_undefined_pd (),\
+ (__mmask8) -1);\
+})
+
+#define _mm512_mask_permute_pd( __W, __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilpd512_mask ((__v8df)( __X),( __C),\
+ (__v8df)( __W),\
+ (__mmask8)( __U));\
+})
+
+#define _mm512_maskz_permute_pd( __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilpd512_mask ((__v8df)( __X),( __C),\
+ (__v8df)\
+ _mm512_setzero_pd (),\
+ (__mmask8)( __U));\
+})
+
+#define _mm512_permute_ps( __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilps512_mask ((__v16sf)( __X),( __C),\
+ (__v16sf)\
+ _mm512_undefined_ps (),\
+ (__mmask16) -1);\
+})
+
+#define _mm512_mask_permute_ps( __W, __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilps512_mask ((__v16sf)( __X),( __C),\
+ (__v16sf)( __W),\
+ (__mmask16)( __U));\
+})
+
+#define _mm512_maskz_permute_ps( __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilps512_mask ((__v16sf)( __X),( __C),\
+ (__v16sf)\
+ _mm512_setzero_ps (),\
+ (__mmask16)( __U));\
+})
+
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_permutevar_pd (__m512d __A, __m512i __C)
+{
+ return (__m512d) __builtin_ia32_vpermilvarpd512_mask ((__v8df) __A,
+ (__v8di) __C,
+ (__v8df)
+ _mm512_undefined_pd (),
+ (__mmask8) -1);
+}
+
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_mask_permutevar_pd (__m512d __W, __mmask8 __U, __m512d __A, __m512i __C)
+{
+ return (__m512d) __builtin_ia32_vpermilvarpd512_mask ((__v8df) __A,
+ (__v8di) __C,
+ (__v8df) __W,
+ (__mmask8) __U);
+}
+
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_maskz_permutevar_pd (__mmask8 __U, __m512d __A, __m512i __C)
+{
+ return (__m512d) __builtin_ia32_vpermilvarpd512_mask ((__v8df) __A,
+ (__v8di) __C,
+ (__v8df)
+ _mm512_setzero_pd (),
+ (__mmask8) __U);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_permutevar_ps (__m512 __A, __m512i __C)
+{
+ return (__m512) __builtin_ia32_vpermilvarps512_mask ((__v16sf) __A,
+ (__v16si) __C,
+ (__v16sf)
+ _mm512_undefined_ps (),
+ (__mmask16) -1);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_mask_permutevar_ps (__m512 __W, __mmask16 __U, __m512 __A, __m512i __C)
+{
+ return (__m512) __builtin_ia32_vpermilvarps512_mask ((__v16sf) __A,
+ (__v16si) __C,
+ (__v16sf) __W,
+ (__mmask16) __U);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_maskz_permutevar_ps (__mmask16 __U, __m512 __A, __m512i __C)
+{
+ return (__m512) __builtin_ia32_vpermilvarps512_mask ((__v16sf) __A,
+ (__v16si) __C,
+ (__v16sf)
+ _mm512_setzero_ps (),
+ (__mmask16) __U);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_permutex2var_epi32 (__mmask16 __U, __m512i __A,
+ __m512i __I, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_vpermt2vard512_maskz ((__v16si) __I
+ /* idx */ ,
+ (__v16si) __A,
+ (__v16si) __B,
+ (__mmask16) __U);
+}
+
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_maskz_permutex2var_pd (__mmask8 __U, __m512d __A, __m512i __I,
+ __m512d __B)
+{
+ return (__m512d) __builtin_ia32_vpermt2varpd512_maskz ((__v8di) __I
+ /* idx */ ,
+ (__v8df) __A,
+ (__v8df) __B,
+ (__mmask8) __U);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_maskz_permutex2var_ps (__mmask16 __U, __m512 __A, __m512i __I,
+ __m512 __B)
+{
+ return (__m512) __builtin_ia32_vpermt2varps512_maskz ((__v16si) __I
+ /* idx */ ,
+ (__v16sf) __A,
+ (__v16sf) __B,
+ (__mmask16) __U);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_permutex2var_epi64 (__mmask8 __U, __m512i __A,
+ __m512i __I, __m512i __B)
+{
+ return (__m512i) __builtin_ia32_vpermt2varq512_maskz ((__v8di) __I
+ /* idx */ ,
+ (__v8di) __A,
+ (__v8di) __B,
+ (__mmask8) __U);
+}
+
#undef __DEFAULT_FN_ATTRS
#endif // __AVX512FINTRIN_H
Modified: cfe/trunk/lib/Headers/avx512vlintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512vlintrin.h?rev=265915&r1=265914&r2=265915&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512vlintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512vlintrin.h Mon Apr 11 02:15:34 2016
@@ -6824,6 +6824,141 @@ _mm256_maskz_lzcnt_epi64 (__mmask8 __U,
(__mmask8) __U);
}
+
+#define _mm_mask_permute_pd( __W, __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilpd_mask ((__v2df)( __X),( __C),\
+ (__v2df)( __W),\
+ (__mmask8)( __U));\
+})
+
+#define _mm_maskz_permute_pd( __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilpd_mask ((__v2df)( __X),( __C),\
+ (__v2df)\
+ _mm_setzero_pd (),\
+ (__mmask8)( __U));\
+})
+
+#define _mm256_mask_permute_pd( __W, __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilpd256_mask ((__v4df)( __X),( __C),\
+ (__v4df)( __W),\
+ (__mmask8)( __U));\
+})
+
+#define _mm256_maskz_permute_pd( __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilpd256_mask ((__v4df)( __X),( __C),\
+ (__v4df)\
+ _mm256_setzero_pd (),\
+ (__mmask8)( __U));\
+})
+
+#define _mm_mask_permute_ps( __W, __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilps_mask ((__v4sf)( __X),( __C),\
+ (__v4sf)( __W),\
+ (__mmask8)( __U));\
+})
+
+#define _mm_maskz_permute_ps( __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilps_mask ((__v4sf)( __X),( __C),\
+ (__v4sf)\
+ _mm_setzero_ps (),\
+ (__mmask8)( __U));\
+})
+
+#define _mm256_mask_permute_ps( __W, __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilps256_mask ((__v8sf)( __X),( __C),\
+ (__v8sf)( __W),\
+ (__mmask8)( __U));\
+})
+
+#define _mm256_maskz_permute_ps( __U, __X, __C) __extension__ ({ \
+__builtin_ia32_vpermilps256_mask ((__v8sf)( __X),( __C),\
+ (__v8sf)\
+ _mm256_setzero_ps (),\
+ (__mmask8)( __U));\
+})
+
+static __inline__ __m128d __DEFAULT_FN_ATTRS
+_mm_mask_permutevar_pd (__m128d __W, __mmask8 __U, __m128d __A,
+ __m128i __C)
+{
+ return (__m128d) __builtin_ia32_vpermilvarpd_mask ((__v2df) __A,
+ (__v2di) __C,
+ (__v2df) __W,
+ (__mmask8) __U);
+}
+
+static __inline__ __m128d __DEFAULT_FN_ATTRS
+_mm_maskz_permutevar_pd (__mmask8 __U, __m128d __A, __m128i __C)
+{
+ return (__m128d) __builtin_ia32_vpermilvarpd_mask ((__v2df) __A,
+ (__v2di) __C,
+ (__v2df)
+ _mm_setzero_pd (),
+ (__mmask8) __U);
+}
+
+static __inline__ __m256d __DEFAULT_FN_ATTRS
+_mm256_mask_permutevar_pd (__m256d __W, __mmask8 __U, __m256d __A,
+ __m256i __C)
+{
+ return (__m256d) __builtin_ia32_vpermilvarpd256_mask ((__v4df) __A,
+ (__v4di) __C,
+ (__v4df) __W,
+ (__mmask8)
+ __U);
+}
+
+static __inline__ __m256d __DEFAULT_FN_ATTRS
+_mm256_maskz_permutevar_pd (__mmask8 __U, __m256d __A, __m256i __C)
+{
+ return (__m256d) __builtin_ia32_vpermilvarpd256_mask ((__v4df) __A,
+ (__v4di) __C,
+ (__v4df)
+ _mm256_setzero_pd (),
+ (__mmask8)
+ __U);
+}
+
+static __inline__ __m128 __DEFAULT_FN_ATTRS
+_mm_mask_permutevar_ps (__m128 __W, __mmask8 __U, __m128 __A,
+ __m128i __C)
+{
+ return (__m128) __builtin_ia32_vpermilvarps_mask ((__v4sf) __A,
+ (__v4si) __C,
+ (__v4sf) __W,
+ (__mmask8) __U);
+}
+
+static __inline__ __m128 __DEFAULT_FN_ATTRS
+_mm_maskz_permutevar_ps (__mmask8 __U, __m128 __A, __m128i __C)
+{
+ return (__m128) __builtin_ia32_vpermilvarps_mask ((__v4sf) __A,
+ (__v4si) __C,
+ (__v4sf)
+ _mm_setzero_ps (),
+ (__mmask8) __U);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_mask_permutevar_ps (__m256 __W, __mmask8 __U, __m256 __A,
+ __m256i __C)
+{
+ return (__m256) __builtin_ia32_vpermilvarps256_mask ((__v8sf) __A,
+ (__v8si) __C,
+ (__v8sf) __W,
+ (__mmask8) __U);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_maskz_permutevar_ps (__mmask8 __U, __m256 __A, __m256i __C)
+{
+ return (__m256) __builtin_ia32_vpermilvarps256_mask ((__v8sf) __A,
+ (__v8si) __C,
+ (__v8sf)
+ _mm256_setzero_ps (),
+ (__mmask8) __U);
+}
+
#undef __DEFAULT_FN_ATTRS
#undef __DEFAULT_FN_ATTRS_BOTH
Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=265915&r1=265914&r2=265915&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c Mon Apr 11 02:15:34 2016
@@ -2586,6 +2586,11 @@ unsigned long long test_mm_cvt_roundsd_s
// CHECK: @llvm.x86.avx512.vcvtsd2si64
return _mm_cvt_roundsd_si64(__A, _MM_FROUND_CUR_DIRECTION);
}
+__m512i test_mm512_mask2_permutex2var_epi32(__m512i __A, __m512i __I, __mmask16 __U, __m512i __B) {
+ // CHECK-LABEL: @test_mm512_mask2_permutex2var_epi32
+ // CHECK: @llvm.x86.avx512.mask.vpermi2var.d.512
+ return _mm512_mask2_permutex2var_epi32(__A, __I, __U, __B);
+}
__m512d test_mm512_maskz_unpackhi_pd(__mmask8 __U, __m512d __A, __m512d __B) {
// CHECK-LABEL: @test_mm512_maskz_unpackhi_pd
@@ -2597,6 +2602,11 @@ long long test_mm_cvt_roundsd_i64(__m128
// CHECK: @llvm.x86.avx512.vcvtsd2si64
return _mm_cvt_roundsd_i64(__A, _MM_FROUND_CUR_DIRECTION);
}
+__m512d test_mm512_mask2_permutex2var_pd(__m512d __A, __m512i __I, __mmask8 __U, __m512d __B) {
+ // CHECK-LABEL: @test_mm512_mask2_permutex2var_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermi2var.pd.512
+ return _mm512_mask2_permutex2var_pd(__A, __I, __U, __B);
+}
__m512 test_mm512_mask_unpackhi_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512 __B) {
// CHECK-LABEL: @test_mm512_mask_unpackhi_ps
@@ -2836,3 +2846,110 @@ unsigned long long test_mm_cvttss_u64(__
// CHECK: @llvm.x86.avx512.cvttss2usi64
return _mm_cvttss_u64(__A);
}
+__m512 test_mm512_mask2_permutex2var_ps(__m512 __A, __m512i __I, __mmask16 __U, __m512 __B) {
+ // CHECK-LABEL: @test_mm512_mask2_permutex2var_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermi2var.ps.512
+ return _mm512_mask2_permutex2var_ps(__A, __I, __U, __B);
+}
+
+__m512i test_mm512_mask2_permutex2var_epi64(__m512i __A, __m512i __I, __mmask8 __U, __m512i __B) {
+ // CHECK-LABEL: @test_mm512_mask2_permutex2var_epi64
+ // CHECK: @llvm.x86.avx512.mask.vpermi2var.q.512
+ return _mm512_mask2_permutex2var_epi64(__A, __I, __U, __B);
+}
+
+__m512d test_mm512_permute_pd(__m512d __X) {
+ // CHECK-LABEL: @test_mm512_permute_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermil.pd.512
+ return _mm512_permute_pd(__X, 2);
+}
+
+__m512d test_mm512_mask_permute_pd(__m512d __W, __mmask8 __U, __m512d __X) {
+ // CHECK-LABEL: @test_mm512_mask_permute_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermil.pd.512
+ return _mm512_mask_permute_pd(__W, __U, __X, 2);
+}
+
+__m512d test_mm512_maskz_permute_pd(__mmask8 __U, __m512d __X) {
+ // CHECK-LABEL: @test_mm512_maskz_permute_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermil.pd.512
+ return _mm512_maskz_permute_pd(__U, __X, 2);
+}
+
+__m512 test_mm512_permute_ps(__m512 __X) {
+ // CHECK-LABEL: @test_mm512_permute_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermil.ps.512
+ return _mm512_permute_ps(__X, 2);
+}
+
+__m512 test_mm512_mask_permute_ps(__m512 __W, __mmask16 __U, __m512 __X) {
+ // CHECK-LABEL: @test_mm512_mask_permute_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermil.ps.512
+ return _mm512_mask_permute_ps(__W, __U, __X, 2);
+}
+
+__m512 test_mm512_maskz_permute_ps(__mmask16 __U, __m512 __X) {
+ // CHECK-LABEL: @test_mm512_maskz_permute_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermil.ps.512
+ return _mm512_maskz_permute_ps(__U, __X, 2);
+}
+
+__m512d test_mm512_permutevar_pd(__m512d __A, __m512i __C) {
+ // CHECK-LABEL: @test_mm512_permutevar_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.512
+ return _mm512_permutevar_pd(__A, __C);
+}
+
+__m512d test_mm512_mask_permutevar_pd(__m512d __W, __mmask8 __U, __m512d __A, __m512i __C) {
+ // CHECK-LABEL: @test_mm512_mask_permutevar_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.512
+ return _mm512_mask_permutevar_pd(__W, __U, __A, __C);
+}
+
+__m512d test_mm512_maskz_permutevar_pd(__mmask8 __U, __m512d __A, __m512i __C) {
+ // CHECK-LABEL: @test_mm512_maskz_permutevar_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.512
+ return _mm512_maskz_permutevar_pd(__U, __A, __C);
+}
+
+__m512 test_mm512_permutevar_ps(__m512 __A, __m512i __C) {
+ // CHECK-LABEL: @test_mm512_permutevar_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.512
+ return _mm512_permutevar_ps(__A, __C);
+}
+
+__m512 test_mm512_mask_permutevar_ps(__m512 __W, __mmask16 __U, __m512 __A, __m512i __C) {
+ // CHECK-LABEL: @test_mm512_mask_permutevar_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.512
+ return _mm512_mask_permutevar_ps(__W, __U, __A, __C);
+}
+
+__m512 test_mm512_maskz_permutevar_ps(__mmask16 __U, __m512 __A, __m512i __C) {
+ // CHECK-LABEL: @test_mm512_maskz_permutevar_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.512
+ return _mm512_maskz_permutevar_ps(__U, __A, __C);
+}
+
+__m512i test_mm512_maskz_permutex2var_epi32(__mmask16 __U, __m512i __A, __m512i __I, __m512i __B) {
+ // CHECK-LABEL: @test_mm512_maskz_permutex2var_epi32
+ // CHECK: @llvm.x86.avx512.maskz.vpermt2var.d.512
+ return _mm512_maskz_permutex2var_epi32(__U, __A, __I, __B);
+}
+
+__m512d test_mm512_maskz_permutex2var_pd(__mmask8 __U, __m512d __A, __m512i __I, __m512d __B) {
+ // CHECK-LABEL: @test_mm512_maskz_permutex2var_pd
+ // CHECK: @llvm.x86.avx512.maskz.vpermt2var.pd.512
+ return _mm512_maskz_permutex2var_pd(__U, __A, __I, __B);
+}
+
+__m512 test_mm512_maskz_permutex2var_ps(__mmask16 __U, __m512 __A, __m512i __I, __m512 __B) {
+ // CHECK-LABEL: @test_mm512_maskz_permutex2var_ps
+ // CHECK: @llvm.x86.avx512.maskz.vpermt2var.ps.512
+ return _mm512_maskz_permutex2var_ps(__U, __A, __I, __B);
+}
+
+__m512i test_mm512_maskz_permutex2var_epi64(__mmask8 __U, __m512i __A, __m512i __I, __m512i __B) {
+ // CHECK-LABEL: @test_mm512_maskz_permutex2var_epi64
+ // CHECK: @llvm.x86.avx512.maskz.vpermt2var.q.512
+ return _mm512_maskz_permutex2var_epi64(__U, __A, __I, __B);
+}
Modified: cfe/trunk/test/CodeGen/avx512vl-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512vl-builtins.c?rev=265915&r1=265914&r2=265915&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512vl-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512vl-builtins.c Mon Apr 11 02:15:34 2016
@@ -4609,3 +4609,98 @@ __m256i test_mm256_maskz_lzcnt_epi64(__m
}
+__m128d test_mm_mask_permute_pd(__m128d __W, __mmask8 __U, __m128d __X) {
+ // CHECK-LABEL: @test_mm_mask_permute_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermil.pd
+ return _mm_mask_permute_pd(__W, __U, __X, 2);
+}
+
+__m128d test_mm_maskz_permute_pd(__mmask8 __U, __m128d __X) {
+ // CHECK-LABEL: @test_mm_maskz_permute_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermil.pd
+ return _mm_maskz_permute_pd(__U, __X, 2);
+}
+
+__m256d test_mm256_mask_permute_pd(__m256d __W, __mmask8 __U, __m256d __X) {
+ // CHECK-LABEL: @test_mm256_mask_permute_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermil.pd.256
+ return _mm256_mask_permute_pd(__W, __U, __X, 2);
+}
+
+__m256d test_mm256_maskz_permute_pd(__mmask8 __U, __m256d __X) {
+ // CHECK-LABEL: @test_mm256_maskz_permute_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermil.pd.256
+ return _mm256_maskz_permute_pd(__U, __X, 2);
+}
+
+__m128 test_mm_mask_permute_ps(__m128 __W, __mmask8 __U, __m128 __X) {
+ // CHECK-LABEL: @test_mm_mask_permute_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermil.ps
+ return _mm_mask_permute_ps(__W, __U, __X, 2);
+}
+
+__m128 test_mm_maskz_permute_ps(__mmask8 __U, __m128 __X) {
+ // CHECK-LABEL: @test_mm_maskz_permute_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermil.ps
+ return _mm_maskz_permute_ps(__U, __X, 2);
+}
+
+__m256 test_mm256_mask_permute_ps(__m256 __W, __mmask8 __U, __m256 __X) {
+ // CHECK-LABEL: @test_mm256_mask_permute_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermil.ps.256
+ return _mm256_mask_permute_ps(__W, __U, __X, 2);
+}
+
+__m256 test_mm256_maskz_permute_ps(__mmask8 __U, __m256 __X) {
+ // CHECK-LABEL: @test_mm256_maskz_permute_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermil.ps.256
+ return _mm256_maskz_permute_ps(__U, __X, 2);
+}
+
+__m128d test_mm_mask_permutevar_pd(__m128d __W, __mmask8 __U, __m128d __A, __m128i __C) {
+ // CHECK-LABEL: @test_mm_mask_permutevar_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd
+ return _mm_mask_permutevar_pd(__W, __U, __A, __C);
+}
+
+__m128d test_mm_maskz_permutevar_pd(__mmask8 __U, __m128d __A, __m128i __C) {
+ // CHECK-LABEL: @test_mm_maskz_permutevar_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd
+ return _mm_maskz_permutevar_pd(__U, __A, __C);
+}
+
+__m256d test_mm256_mask_permutevar_pd(__m256d __W, __mmask8 __U, __m256d __A, __m256i __C) {
+ // CHECK-LABEL: @test_mm256_mask_permutevar_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.256
+ return _mm256_mask_permutevar_pd(__W, __U, __A, __C);
+}
+
+__m256d test_mm256_maskz_permutevar_pd(__mmask8 __U, __m256d __A, __m256i __C) {
+ // CHECK-LABEL: @test_mm256_maskz_permutevar_pd
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.pd.256
+ return _mm256_maskz_permutevar_pd(__U, __A, __C);
+}
+
+__m128 test_mm_mask_permutevar_ps(__m128 __W, __mmask8 __U, __m128 __A, __m128i __C) {
+ // CHECK-LABEL: @test_mm_mask_permutevar_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps
+ return _mm_mask_permutevar_ps(__W, __U, __A, __C);
+}
+
+__m128 test_mm_maskz_permutevar_ps(__mmask8 __U, __m128 __A, __m128i __C) {
+ // CHECK-LABEL: @test_mm_maskz_permutevar_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps
+ return _mm_maskz_permutevar_ps(__U, __A, __C);
+}
+
+__m256 test_mm256_mask_permutevar_ps(__m256 __W, __mmask8 __U, __m256 __A, __m256i __C) {
+ // CHECK-LABEL: @test_mm256_mask_permutevar_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.256
+ return _mm256_mask_permutevar_ps(__W, __U, __A, __C);
+}
+
+__m256 test_mm256_maskz_permutevar_ps(__mmask8 __U, __m256 __A, __m256i __C) {
+ // CHECK-LABEL: @test_mm256_maskz_permutevar_ps
+ // CHECK: @llvm.x86.avx512.mask.vpermilvar.ps.256
+ return _mm256_maskz_permutevar_ps(__U, __A, __C);
+}
More information about the cfe-commits
mailing list