r266195 - [Clang][AVX512][Builtin] Adding support for VBROADCAST and VPBROADCASTB/W/D/Q instruction set
Michael Zuckerman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 13 05:58:01 PDT 2016
Author: mzuckerm
Date: Wed Apr 13 07:58:01 2016
New Revision: 266195
URL: http://llvm.org/viewvc/llvm-project?rev=266195&view=rev
Log:
[Clang][AVX512][Builtin] Adding support for VBROADCAST and VPBROADCASTB/W/D/Q instruction set
Differential Revision: http://reviews.llvm.org/D19012
Modified:
cfe/trunk/include/clang/Basic/BuiltinsX86.def
cfe/trunk/lib/Headers/avx512bwintrin.h
cfe/trunk/lib/Headers/avx512dqintrin.h
cfe/trunk/lib/Headers/avx512vlbwintrin.h
cfe/trunk/lib/Headers/avx512vldqintrin.h
cfe/trunk/lib/Headers/avx512vlintrin.h
cfe/trunk/test/CodeGen/avx512bw-builtins.c
cfe/trunk/test/CodeGen/avx512dq-builtins.c
cfe/trunk/test/CodeGen/avx512vl-builtins.c
cfe/trunk/test/CodeGen/avx512vlbw-builtins.c
cfe/trunk/test/CodeGen/avx512vldq-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=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Wed Apr 13 07:58:01 2016
@@ -1983,6 +1983,35 @@ TARGET_BUILTIN(__builtin_ia32_cvtmask2q1
TARGET_BUILTIN(__builtin_ia32_cvtmask2q256, "V4LLiUc","","avx512dq,avx512vl")
TARGET_BUILTIN(__builtin_ia32_cvtq2mask128, "UcV2LLi","","avx512dq,avx512vl")
TARGET_BUILTIN(__builtin_ia32_cvtq2mask256, "UcV4LLi","","avx512dq,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcastf32x2_512_mask, "V16fV4fV16fUs","","avx512dq")
+TARGET_BUILTIN(__builtin_ia32_broadcastf32x8_512_mask, "V16fV8fV16fUs","","avx512dq")
+TARGET_BUILTIN(__builtin_ia32_broadcastf64x2_512_mask, "V8dV2dV8dUc","","avx512dq")
+TARGET_BUILTIN(__builtin_ia32_broadcasti32x2_512_mask, "V16iV4iV16iUs","","avx512dq")
+TARGET_BUILTIN(__builtin_ia32_broadcasti32x8_512_mask, "V16iV8iV16iUs","","avx512dq")
+TARGET_BUILTIN(__builtin_ia32_broadcasti64x2_512_mask, "V8LLiV2LLiV8LLiUc","","avx512dq")
+TARGET_BUILTIN(__builtin_ia32_broadcastf32x2_256_mask, "V8fV4fV8fUc","","avx512dq,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcastf64x2_256_mask, "V4dV2dV4dUc","","avx512dq,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcasti32x2_128_mask, "V4iV4iV4iUc","","avx512dq,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcasti32x2_256_mask, "V8iV4iV8iUc","","avx512dq,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcasti64x2_256_mask, "V4LLiV2LLiV4LLiUc","","avx512dq,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcastf32x4_256_mask, "V8fV4fV8fUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcasti32x4_256_mask, "V8iV4iV8iUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcastsd256_mask, "V4dV2dV4dUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcastss128_mask, "V4fV4fV4fUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_broadcastss256_mask, "V8fV4fV8fUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastw512_mask, "V32sV8sV32sUi","","avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastb128_mask, "V16cV16cV16cUs","","avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastb256_mask, "V32cV16cV32cUi","","avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastw128_mask, "V8sV8sV8sUc","","avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastw256_mask, "V16sV8sV16sUs","","avx512vl,avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastd128_mask, "V4iV4iV4iUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastd256_mask, "V8iV4iV8iUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastq128_mask, "V2LLiV2LLiV2LLiUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastq256_mask, "V4LLiV2LLiV4LLiUc","","avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastb512_mask, "V64cV16cV64cULLi","","avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastw512_gpr_mask, "V32shV32sUi","","avx512bw")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastw256_gpr_mask, "V16shV16sUs","","avx512bw,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_pbroadcastw128_gpr_mask, "V8ssV8sUc","","avx512bw,avx512vl")
#undef BUILTIN
#undef TARGET_BUILTIN
Modified: cfe/trunk/lib/Headers/avx512bwintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512bwintrin.h?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512bwintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512bwintrin.h Wed Apr 13 07:58:01 2016
@@ -2075,6 +2075,69 @@ _mm512_movm_epi16 (__mmask32 __A)
return (__m512i) __builtin_ia32_cvtmask2w512 (__A);
}
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_broadcastb_epi8 (__m128i __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
+ (__v64qi) _mm512_setzero_si512(),
+ (__mmask64) -1);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask_broadcastb_epi8 (__m512i __O, __mmask64 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
+ (__v64qi) __O,
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcastb_epi8 (__mmask64 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastb512_mask ((__v16qi) __A,
+ (__v64qi) _mm512_setzero_qi(),
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask_set1_epi16 (__m512i __O, __mmask32 __M, short __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastw512_gpr_mask (__A,
+ (__v32hi) __O,
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_set1_epi16 (__mmask32 __M, short __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastw512_gpr_mask (__A,
+ (__v32hi) _mm512_setzero_hi(),
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_broadcastw_epi16 (__m128i __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
+ (__v32hi) _mm512_setzero_si512(),
+ (__mmask32) -1);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask_broadcastw_epi16 (__m512i __O, __mmask32 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
+ (__v32hi) __O,
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcastw_epi16 (__mmask32 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_pbroadcastw512_mask ((__v8hi) __A,
+ (__v32hi) _mm512_setzero_hi(),
+ __M);
+}
#undef __DEFAULT_FN_ATTRS
Modified: cfe/trunk/lib/Headers/avx512dqintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512dqintrin.h?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512dqintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512dqintrin.h Wed Apr 13 07:58:01 2016
@@ -798,6 +798,151 @@ _mm512_movepi64_mask (__m512i __A)
}
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_broadcast_f32x2 (__m128 __A)
+{
+ return (__m512) __builtin_ia32_broadcastf32x2_512_mask ((__v4sf) __A,
+ (__v16sf)_mm512_undefined_ps(),
+ (__mmask16) - 1);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_mask_broadcast_f32x2 (__m512 __O, __mmask16 __M, __m128 __A)
+{
+ return (__m512) __builtin_ia32_broadcastf32x2_512_mask ((__v4sf) __A,
+ (__v16sf)
+ __O, __M);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcast_f32x2 (__mmask16 __M, __m128 __A)
+{
+ return (__m512) __builtin_ia32_broadcastf32x2_512_mask ((__v4sf) __A,
+ (__v16sf)_mm512_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_broadcast_f32x8 (__m256 __A)
+{
+ return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,
+ _mm512_undefined_ps(),
+ (__mmask16) - 1);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_mask_broadcast_f32x8 (__m512 __O, __mmask16 __M, __m256 __A)
+{
+ return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,
+ (__v16sf)__O,
+ __M);
+}
+
+static __inline__ __m512 __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcast_f32x8 (__mmask16 __M, __m256 __A)
+{
+ return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,
+ (__v16sf)_mm512_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_broadcast_f64x2 (__m128d __A)
+{
+ return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df) __A,
+ (__v8df)_mm512_undefined_pd(),
+ (__mmask8) - 1);
+}
+
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_mask_broadcast_f64x2 (__m512d __O, __mmask8 __M, __m128d __A)
+{
+ return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df) __A,
+ (__v8df)
+ __O, __M);
+}
+
+static __inline__ __m512d __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcast_f64x2 (__mmask8 __M, __m128d __A)
+{
+ return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df) __A,
+ (__v8df)_mm512_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_broadcast_i32x2 (__m128i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti32x2_512_mask ((__v4si) __A,
+ (__v16si)_mm512_setzero_si512(),
+ (__mmask16) - 1);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask_broadcast_i32x2 (__m512i __O, __mmask16 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti32x2_512_mask ((__v4si) __A,
+ (__v16si)
+ __O, __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcast_i32x2 (__mmask16 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti32x2_512_mask ((__v4si) __A,
+ (__v16si)_mm512_setzero_si512 (),
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_broadcast_i32x8 (__m256i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A,
+ (__v16si)_mm512_setzero_si512(),
+ (__mmask16) - 1);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask_broadcast_i32x8 (__m512i __O, __mmask16 __M, __m256i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A,
+ (__v16si)__O,
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcast_i32x8 (__mmask16 __M, __m256i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A,
+ (__v16si)
+ _mm512_setzero_si512 (),
+ __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_broadcast_i64x2 (__m128i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A,
+ (__v8di)_mm512_setzero_si512(),
+ (__mmask8) - 1);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_mask_broadcast_i64x2 (__m512i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A,
+ (__v8di)
+ __O, __M);
+}
+
+static __inline__ __m512i __DEFAULT_FN_ATTRS
+_mm512_maskz_broadcast_i64x2 (__mmask8 __M, __m128i __A)
+{
+ return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A,
+ (__v8di)_mm512_setzero_si512 (),
+ __M);
+}
+
#undef __DEFAULT_FN_ATTRS
#endif
Modified: cfe/trunk/lib/Headers/avx512vlbwintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512vlbwintrin.h?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512vlbwintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512vlbwintrin.h Wed Apr 13 07:58:01 2016
@@ -2847,9 +2847,6 @@ __builtin_ia32_psrlwi256_mask ((__v16hi)
(__mmask16)( __U));\
})
-
-
-
static __inline__ __m128i __DEFAULT_FN_ATTRS
_mm_mask_mov_epi16 (__m128i __W, __mmask8 __U, __m128i __A)
{
@@ -3208,6 +3205,102 @@ _mm256_movm_epi16 (__mmask16 __A)
return (__m256i) __builtin_ia32_cvtmask2w256 (__A);
}
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_broadcastb_epi8 (__m128i __O, __mmask16 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastb128_mask ((__v16qi) __A,
+ (__v16qi) __O,
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_broadcastb_epi8 (__mmask16 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastb128_mask ((__v16qi) __A,
+ (__v16qi) _mm_setzero_si128 (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_broadcastb_epi8 (__m256i __O, __mmask32 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastb256_mask ((__v16qi) __A,
+ (__v32qi) __O,
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcastb_epi8 (__mmask32 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastb256_mask ((__v16qi) __A,
+ (__v32qi) _mm256_setzero_si256 (),
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_broadcastw_epi16 (__m128i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastw128_mask ((__v8hi) __A,
+ (__v8hi) __O,
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_broadcastw_epi16 (__mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastw128_mask ((__v8hi) __A,
+ (__v8hi) _mm_setzero_si128 (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_broadcastw_epi16 (__m256i __O, __mmask16 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastw256_mask ((__v8hi) __A,
+ (__v16hi) __O,
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcastw_epi16 (__mmask16 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastw256_mask ((__v8hi) __A,
+ (__v16hi) _mm256_setzero_si256 (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_set1_epi16 (__m256i __O, __mmask16 __M, short __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastw256_gpr_mask (__A,
+ (__v16hi) __O,
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_set1_epi16 (__mmask16 __M, short __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastw256_gpr_mask (__A,
+ (__v16hi) _mm256_setzero_si256 (),
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_set1_epi16 (__m128i __O, __mmask8 __M, short __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastw128_gpr_mask (__A,
+ (__v8hi) __O,
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_set1_epi16 (__mmask8 __M, short __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastw128_gpr_mask (__A,
+ (__v8hi) _mm_setzero_si128 (),
+ __M);
+}
+
#undef __DEFAULT_FN_ATTRS
Modified: cfe/trunk/lib/Headers/avx512vldqintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512vldqintrin.h?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512vldqintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512vldqintrin.h Wed Apr 13 07:58:01 2016
@@ -996,6 +996,126 @@ _mm256_movepi64_mask (__m256i __A)
return (__mmask8) __builtin_ia32_cvtq2mask256 ((__v4di) __A);
}
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_broadcast_f32x2 (__m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastf32x2_256_mask ((__v4sf) __A,
+ (__v8sf)_mm256_undefined_ps(),
+ (__mmask8) -1);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_mask_broadcast_f32x2 (__m256 __O, __mmask8 __M, __m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastf32x2_256_mask ((__v4sf) __A,
+ (__v8sf) __O,
+ __M);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcast_f32x2 (__mmask8 __M, __m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastf32x2_256_mask ((__v4sf) __A,
+ (__v8sf) _mm256_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m256d __DEFAULT_FN_ATTRS
+_mm256_broadcast_f64x2 (__m128d __A)
+{
+ return (__m256d) __builtin_ia32_broadcastf64x2_256_mask ((__v2df) __A,
+ (__v4df)_mm256_undefined_pd(),
+ (__mmask8) -1);
+}
+
+static __inline__ __m256d __DEFAULT_FN_ATTRS
+_mm256_mask_broadcast_f64x2 (__m256d __O, __mmask8 __M, __m128d __A)
+{
+ return (__m256d) __builtin_ia32_broadcastf64x2_256_mask ((__v2df) __A,
+ (__v4df) __O,
+ __M);
+}
+
+static __inline__ __m256d __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcast_f64x2 (__mmask8 __M, __m128d __A)
+{
+ return (__m256d) __builtin_ia32_broadcastf64x2_256_mask ((__v2df) __A,
+ (__v4df) _mm256_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_broadcast_i32x2 (__m128i __A)
+{
+ return (__m128i) __builtin_ia32_broadcasti32x2_128_mask ((__v4si) __A,
+ (__v4si)_mm_undefined_si128(),
+ (__mmask8) -1);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_broadcast_i32x2 (__m128i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_broadcasti32x2_128_mask ((__v4si) __A,
+ (__v4si) __O,
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_broadcast_i32x2 (__mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_broadcasti32x2_128_mask ((__v4si) __A,
+ (__v4si) _mm_setzero_si128 (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_broadcast_i32x2 (__m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti32x2_256_mask ((__v4si) __A,
+ (__v8si)_mm256_undefined_si256(),
+ (__mmask8) - 1);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_broadcast_i32x2 (__m256i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti32x2_256_mask ((__v4si) __A,
+ (__v8si) __O,
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcast_i32x2 (__mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti32x2_256_mask ((__v4si) __A,
+ (__v8si) _mm256_setzero_si256 (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_broadcast_i64x2 (__m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti64x2_256_mask ((__v2di) __A,
+ (__v4di)_mm256_undefined_si256(),
+ (__mmask8) - 1);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_broadcast_i64x2 (__m256i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti64x2_256_mask ((__v2di) __A,
+ (__v4di) __O,
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcast_i64x2 (__mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti64x2_256_mask ((__v2di) __A,
+ (__v4di) _mm256_setzero_si256 (),
+ __M);
+}
+
#undef __DEFAULT_FN_ATTRS
#endif
Modified: cfe/trunk/lib/Headers/avx512vlintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512vlintrin.h?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512vlintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512vlintrin.h Wed Apr 13 07:58:01 2016
@@ -7765,6 +7765,167 @@ _mm256_maskz_rsqrt14_ps (__mmask8 __U, _
(__mmask8) __U);
}
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_broadcast_f32x4 (__m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastf32x4_256_mask ((__v4sf) __A,
+ (__v8sf)_mm256_undefined_pd (),
+ (__mmask8) - 1);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_mask_broadcast_f32x4 (__m256 __O, __mmask8 __M, __m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastf32x4_256_mask ((__v4sf) __A,
+ (__v8sf) __O,
+ __M);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcast_f32x4 (__mmask8 __M, __m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastf32x4_256_mask ((__v4sf) __A,
+ (__v8sf) _mm256_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_broadcast_i32x4 (__m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti32x4_256_mask ((__v4si) __A,
+ (__v8si)_mm256_undefined_si256 (),
+ (__mmask8) - 1);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_broadcast_i32x4 (__m256i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti32x4_256_mask ((__v4si) __A,
+ (__v8si)
+ __O, __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcast_i32x4 (__mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_broadcasti32x4_256_mask ((__v4si)
+ __A,
+ (__v8si) _mm256_setzero_si256 (),
+ __M);
+}
+
+static __inline__ __m256d __DEFAULT_FN_ATTRS
+_mm256_mask_broadcastsd_pd (__m256d __O, __mmask8 __M, __m128d __A)
+{
+ return (__m256d) __builtin_ia32_broadcastsd256_mask ((__v2df) __A,
+ (__v4df) __O,
+ __M);
+}
+
+static __inline__ __m256d __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcastsd_pd (__mmask8 __M, __m128d __A)
+{
+ return (__m256d) __builtin_ia32_broadcastsd256_mask ((__v2df) __A,
+ (__v4df) _mm256_setzero_pd (),
+ __M);
+}
+
+static __inline__ __m128 __DEFAULT_FN_ATTRS
+_mm_mask_broadcastss_ps (__m128 __O, __mmask8 __M, __m128 __A)
+{
+ return (__m128) __builtin_ia32_broadcastss128_mask ((__v4sf) __A,
+ (__v4sf) __O,
+ __M);
+}
+
+static __inline__ __m128 __DEFAULT_FN_ATTRS
+_mm_maskz_broadcastss_ps (__mmask8 __M, __m128 __A)
+{
+ return (__m128) __builtin_ia32_broadcastss128_mask ((__v4sf) __A,
+ (__v4sf) _mm_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_mask_broadcastss_ps (__m256 __O, __mmask8 __M, __m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastss256_mask ((__v4sf) __A,
+ (__v8sf) __O,
+ __M);
+}
+
+static __inline__ __m256 __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcastss_ps (__mmask8 __M, __m128 __A)
+{
+ return (__m256) __builtin_ia32_broadcastss256_mask ((__v4sf) __A,
+ (__v8sf) _mm256_setzero_ps (),
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_broadcastd_epi32 (__m128i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastd128_mask ((__v4si) __A,
+ (__v4si) __O,
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_broadcastd_epi32 (__mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastd128_mask ((__v4si) __A,
+ (__v4si) _mm_setzero_si128 (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_broadcastd_epi32 (__m256i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastd256_mask ((__v4si) __A,
+ (__v8si) __O,
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcastd_epi32 (__mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastd256_mask ((__v4si) __A,
+ (__v8si) _mm256_setzero_si256 (),
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_broadcastq_epi64 (__m128i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastq128_mask ((__v2di) __A,
+ (__v2di) __O,
+ __M);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_broadcastq_epi64 (__mmask8 __M, __m128i __A)
+{
+ return (__m128i) __builtin_ia32_pbroadcastq128_mask ((__v2di) __A,
+ (__v2di) _mm_setzero_si128 (),
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_broadcastq_epi64 (__m256i __O, __mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastq256_mask ((__v2di) __A,
+ (__v4di) __O,
+ __M);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_broadcastq_epi64 (__mmask8 __M, __m128i __A)
+{
+ return (__m256i) __builtin_ia32_pbroadcastq256_mask ((__v2di) __A,
+ (__v4di) _mm256_setzero_si256 (),
+ __M);
+}
+
#undef __DEFAULT_FN_ATTRS
#undef __DEFAULT_FN_ATTRS_BOTH
Modified: cfe/trunk/test/CodeGen/avx512bw-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512bw-builtins.c?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512bw-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512bw-builtins.c Wed Apr 13 07:58:01 2016
@@ -1423,3 +1423,50 @@ __m512i test_mm512_movm_epi16(__mmask32
}
+__m512i test_mm512_broadcastb_epi8(__m128i __A) {
+ // CHECK-LABEL: @test_mm512_broadcastb_epi8
+ // CHECK: @llvm.x86.avx512.pbroadcastb.512
+ return _mm512_broadcastb_epi8(__A);
+}
+
+__m512i test_mm512_mask_broadcastb_epi8(__m512i __O, __mmask64 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcastb_epi8
+ // CHECK: @llvm.x86.avx512.pbroadcastb.512
+ return _mm512_mask_broadcastb_epi8(__O, __M, __A);
+}
+
+__m512i test_mm512_maskz_broadcastb_epi8(__mmask64 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcastb_epi8
+ // CHECK: @llvm.x86.avx512.pbroadcastb.512
+ return _mm512_maskz_broadcastb_epi8(__M, __A);
+}
+
+__m512i test_mm512_broadcastw_epi16(__m128i __A) {
+ // CHECK-LABEL: @test_mm512_broadcastw_epi16
+ // CHECK: @llvm.x86.avx512.pbroadcastw.512
+ return _mm512_broadcastw_epi16(__A);
+}
+
+__m512i test_mm512_mask_broadcastw_epi16(__m512i __O, __mmask32 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcastw_epi16
+ // CHECK: @llvm.x86.avx512.pbroadcastw.512
+ return _mm512_mask_broadcastw_epi16(__O, __M, __A);
+}
+
+__m512i test_mm512_maskz_broadcastw_epi16(__mmask32 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcastw_epi16
+ // CHECK: @llvm.x86.avx512.pbroadcastw.512
+ return _mm512_maskz_broadcastw_epi16(__M, __A);
+}
+
+__m512i test_mm512_mask_set1_epi16(__m512i __O, __mmask32 __M, short __A) {
+ // CHECK-LABEL: @test_mm512_mask_set1_epi16
+ // CHECK: @llvm.x86.avx512.mask.pbroadcast.w.gpr.512
+ return _mm512_mask_set1_epi16(__O, __M, __A);
+}
+
+__m512i test_mm512_maskz_set1_epi16(__mmask32 __M, short __A) {
+ // CHECK-LABEL: @test_mm512_maskz_set1_epi16
+ // CHECK: @llvm.x86.avx512.mask.pbroadcast.w.gpr.512
+ return _mm512_maskz_set1_epi16(__M, __A);
+}
Modified: cfe/trunk/test/CodeGen/avx512dq-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512dq-builtins.c?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512dq-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512dq-builtins.c Wed Apr 13 07:58:01 2016
@@ -767,3 +767,110 @@ __mmask8 test_mm512_movepi64_mask(__m512
return _mm512_movepi64_mask(__A);
}
+__m512 test_mm512_broadcast_f32x2(__m128 __A) {
+ // CHECK-LABEL: @test_mm512_broadcast_f32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x2
+ return _mm512_broadcast_f32x2(__A);
+}
+
+__m512 test_mm512_mask_broadcast_f32x2(__m512 __O, __mmask16 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcast_f32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x2
+ return _mm512_mask_broadcast_f32x2(__O, __M, __A);
+}
+
+__m512 test_mm512_maskz_broadcast_f32x2(__mmask16 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcast_f32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x2
+ return _mm512_maskz_broadcast_f32x2(__M, __A);
+}
+
+__m512 test_mm512_broadcast_f32x8(__m256 __A) {
+ // CHECK-LABEL: @test_mm512_broadcast_f32x8
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x8
+ return _mm512_broadcast_f32x8(__A);
+}
+
+__m512 test_mm512_mask_broadcast_f32x8(__m512 __O, __mmask16 __M, __m256 __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcast_f32x8
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x8
+ return _mm512_mask_broadcast_f32x8(__O, __M, __A);
+}
+
+__m512 test_mm512_maskz_broadcast_f32x8(__mmask16 __M, __m256 __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcast_f32x8
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x8
+ return _mm512_maskz_broadcast_f32x8(__M, __A);
+}
+
+__m512d test_mm512_broadcast_f64x2(__m128d __A) {
+ // CHECK-LABEL: @test_mm512_broadcast_f64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf64x2
+ return _mm512_broadcast_f64x2(__A);
+}
+
+__m512d test_mm512_mask_broadcast_f64x2(__m512d __O, __mmask8 __M, __m128d __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcast_f64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf64x2
+ return _mm512_mask_broadcast_f64x2(__O, __M, __A);
+}
+
+__m512d test_mm512_maskz_broadcast_f64x2(__mmask8 __M, __m128d __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcast_f64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf64x2
+ return _mm512_maskz_broadcast_f64x2(__M, __A);
+}
+
+__m512i test_mm512_broadcast_i32x2(__m128i __A) {
+ // CHECK-LABEL: @test_mm512_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm512_broadcast_i32x2(__A);
+}
+
+__m512i test_mm512_mask_broadcast_i32x2(__m512i __O, __mmask16 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm512_mask_broadcast_i32x2(__O, __M, __A);
+}
+
+__m512i test_mm512_maskz_broadcast_i32x2(__mmask16 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm512_maskz_broadcast_i32x2(__M, __A);
+}
+
+__m512i test_mm512_broadcast_i32x8(__m256i __A) {
+ // CHECK-LABEL: @test_mm512_broadcast_i32x8
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x8
+ return _mm512_broadcast_i32x8(__A);
+}
+
+__m512i test_mm512_mask_broadcast_i32x8(__m512i __O, __mmask16 __M, __m256i __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcast_i32x8
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x8
+ return _mm512_mask_broadcast_i32x8(__O, __M, __A);
+}
+
+__m512i test_mm512_maskz_broadcast_i32x8(__mmask16 __M, __m256i __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcast_i32x8
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x8
+ return _mm512_maskz_broadcast_i32x8(__M, __A);
+}
+
+__m512i test_mm512_broadcast_i64x2(__m128i __A) {
+ // CHECK-LABEL: @test_mm512_broadcast_i64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti64x2
+ return _mm512_broadcast_i64x2(__A);
+}
+
+__m512i test_mm512_mask_broadcast_i64x2(__m512i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_mask_broadcast_i64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti64x2
+ return _mm512_mask_broadcast_i64x2(__O, __M, __A);
+}
+
+__m512i test_mm512_maskz_broadcast_i64x2(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm512_maskz_broadcast_i64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti64x2
+ return _mm512_maskz_broadcast_i64x2(__M, __A);
+}
Modified: cfe/trunk/test/CodeGen/avx512vl-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512vl-builtins.c?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512vl-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512vl-builtins.c Wed Apr 13 07:58:01 2016
@@ -5278,3 +5278,123 @@ __m256 test_mm256_maskz_rsqrt14_ps(__mma
// CHECK: @llvm.x86.avx512.rsqrt14.ps.256
return _mm256_maskz_rsqrt14_ps(__U, __A);
}
+
+__m256 test_mm256_broadcast_f32x4(__m128 __A) {
+ // CHECK-LABEL: @test_mm256_broadcast_f32x4
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x4
+ return _mm256_broadcast_f32x4(__A);
+}
+
+__m256 test_mm256_mask_broadcast_f32x4(__m256 __O, __mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcast_f32x4
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x4
+ return _mm256_mask_broadcast_f32x4(__O, __M, __A);
+}
+
+__m256 test_mm256_maskz_broadcast_f32x4(__mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcast_f32x4
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x4
+ return _mm256_maskz_broadcast_f32x4(__M, __A);
+}
+
+__m256i test_mm256_broadcast_i32x4(__m128i __A) {
+ // CHECK-LABEL: @test_mm256_broadcast_i32x4
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x4
+ return _mm256_broadcast_i32x4(__A);
+}
+
+__m256i test_mm256_mask_broadcast_i32x4(__m256i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcast_i32x4
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x4
+ return _mm256_mask_broadcast_i32x4(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_broadcast_i32x4(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcast_i32x4
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x4
+ return _mm256_maskz_broadcast_i32x4(__M, __A);
+}
+
+__m256d test_mm256_mask_broadcastsd_pd(__m256d __O, __mmask8 __M, __m128d __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcastsd_pd
+ // CHECK: @llvm.x86.avx512.mask.broadcast.sd.pd.256
+ return _mm256_mask_broadcastsd_pd(__O, __M, __A);
+}
+
+__m256d test_mm256_maskz_broadcastsd_pd(__mmask8 __M, __m128d __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcastsd_pd
+ // CHECK: @llvm.x86.avx512.mask.broadcast.sd.pd.256
+ return _mm256_maskz_broadcastsd_pd(__M, __A);
+}
+
+__m128 test_mm_mask_broadcastss_ps(__m128 __O, __mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm_mask_broadcastss_ps
+ // CHECK: @llvm.x86.avx512.mask.broadcast.ss.ps.128
+ return _mm_mask_broadcastss_ps(__O, __M, __A);
+}
+
+__m128 test_mm_maskz_broadcastss_ps(__mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm_maskz_broadcastss_ps
+ // CHECK: @llvm.x86.avx512.mask.broadcast.ss.ps.128
+ return _mm_maskz_broadcastss_ps(__M, __A);
+}
+
+__m256 test_mm256_mask_broadcastss_ps(__m256 __O, __mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcastss_ps
+ // CHECK: @llvm.x86.avx512.mask.broadcast.ss.ps.256
+ return _mm256_mask_broadcastss_ps(__O, __M, __A);
+}
+
+__m256 test_mm256_maskz_broadcastss_ps(__mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcastss_ps
+ // CHECK: @llvm.x86.avx512.mask.broadcast.ss.ps.256
+ return _mm256_maskz_broadcastss_ps(__M, __A);
+}
+
+__m128i test_mm_mask_broadcastd_epi32(__m128i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_mask_broadcastd_epi32
+ // CHECK: @llvm.x86.avx512.pbroadcastd.128
+ return _mm_mask_broadcastd_epi32(__O, __M, __A);
+}
+
+__m128i test_mm_maskz_broadcastd_epi32(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_maskz_broadcastd_epi32
+ // CHECK: @llvm.x86.avx512.pbroadcastd.128
+ return _mm_maskz_broadcastd_epi32(__M, __A);
+}
+
+__m256i test_mm256_mask_broadcastd_epi32(__m256i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcastd_epi32
+ // CHECK: @llvm.x86.avx512.pbroadcastd.256
+ return _mm256_mask_broadcastd_epi32(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_broadcastd_epi32(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcastd_epi32
+ // CHECK: @llvm.x86.avx512.pbroadcastd.256
+ return _mm256_maskz_broadcastd_epi32(__M, __A);
+}
+
+__m128i test_mm_mask_broadcastq_epi64(__m128i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_mask_broadcastq_epi64
+ // CHECK: @llvm.x86.avx512.pbroadcastq.128
+ return _mm_mask_broadcastq_epi64(__O, __M, __A);
+}
+
+__m128i test_mm_maskz_broadcastq_epi64(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_maskz_broadcastq_epi64
+ // CHECK: @llvm.x86.avx512.pbroadcastq.128
+ return _mm_maskz_broadcastq_epi64(__M, __A);
+}
+
+__m256i test_mm256_mask_broadcastq_epi64(__m256i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcastq_epi64
+ // CHECK: @llvm.x86.avx512.pbroadcastq.256
+ return _mm256_mask_broadcastq_epi64(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_broadcastq_epi64(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcastq_epi64
+ // CHECK: @llvm.x86.avx512.pbroadcastq.256
+ return _mm256_maskz_broadcastq_epi64(__M, __A);
+}
Modified: cfe/trunk/test/CodeGen/avx512vlbw-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512vlbw-builtins.c?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512vlbw-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512vlbw-builtins.c Wed Apr 13 07:58:01 2016
@@ -2210,3 +2210,74 @@ __m256i test_mm256_movm_epi16(__mmask16
+__m128i test_mm_mask_broadcastb_epi8(__m128i __O, __mmask16 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_mask_broadcastb_epi8
+ // CHECK: @llvm.x86.avx512.pbroadcastb.128
+ return _mm_mask_broadcastb_epi8(__O, __M, __A);
+}
+
+__m128i test_mm_maskz_broadcastb_epi8(__mmask16 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_maskz_broadcastb_epi8
+ // CHECK: @llvm.x86.avx512.pbroadcastb.128
+ return _mm_maskz_broadcastb_epi8(__M, __A);
+}
+
+__m256i test_mm256_mask_broadcastb_epi8(__m256i __O, __mmask32 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcastb_epi8
+ // CHECK: @llvm.x86.avx512.pbroadcastb.256
+ return _mm256_mask_broadcastb_epi8(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_broadcastb_epi8(__mmask32 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcastb_epi8
+ // CHECK: @llvm.x86.avx512.pbroadcastb.256
+ return _mm256_maskz_broadcastb_epi8(__M, __A);
+}
+
+__m128i test_mm_mask_broadcastw_epi16(__m128i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_mask_broadcastw_epi16
+ // CHECK: @llvm.x86.avx512.pbroadcastw.128
+ return _mm_mask_broadcastw_epi16(__O, __M, __A);
+}
+
+__m128i test_mm_maskz_broadcastw_epi16(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_maskz_broadcastw_epi16
+ // CHECK: @llvm.x86.avx512.pbroadcastw.128
+ return _mm_maskz_broadcastw_epi16(__M, __A);
+}
+
+__m256i test_mm256_mask_broadcastw_epi16(__m256i __O, __mmask16 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcastw_epi16
+ // CHECK: @llvm.x86.avx512.pbroadcastw.256
+ return _mm256_mask_broadcastw_epi16(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_broadcastw_epi16(__mmask16 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcastw_epi16
+ // CHECK: @llvm.x86.avx512.pbroadcastw.256
+ return _mm256_maskz_broadcastw_epi16(__M, __A);
+}
+
+__m256i test_mm256_mask_set1_epi16(__m256i __O, __mmask16 __M, short __A) {
+ // CHECK-LABEL: @test_mm256_mask_set1_epi16
+ // CHECK: @llvm.x86.avx512.mask.pbroadcast.w.gpr.256
+ return _mm256_mask_set1_epi16(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_set1_epi16(__mmask16 __M, short __A) {
+ // CHECK-LABEL: @test_mm256_maskz_set1_epi16
+ // CHECK: @llvm.x86.avx512.mask.pbroadcast.w.gpr.256
+ return _mm256_maskz_set1_epi16(__M, __A);
+}
+
+__m128i test_mm_mask_set1_epi16(__m128i __O, __mmask8 __M, short __A) {
+ // CHECK-LABEL: @test_mm_mask_set1_epi16
+ // CHECK: @llvm.x86.avx512.mask.pbroadcast.w.gpr.128
+ return _mm_mask_set1_epi16(__O, __M, __A);
+}
+
+__m128i test_mm_maskz_set1_epi16(__mmask8 __M, short __A) {
+ // CHECK-LABEL: @test_mm_maskz_set1_epi16
+ // CHECK: @llvm.x86.avx512.mask.pbroadcast.w.gpr.128
+ return _mm_maskz_set1_epi16(__M, __A);
+}
Modified: cfe/trunk/test/CodeGen/avx512vldq-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512vldq-builtins.c?rev=266195&r1=266194&r2=266195&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512vldq-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512vldq-builtins.c Wed Apr 13 07:58:01 2016
@@ -857,3 +857,93 @@ __mmask8 test_mm256_movepi64_mask(__m256
return _mm256_movepi64_mask(__A);
}
+
+__m256 test_mm256_broadcast_f32x2(__m128 __A) {
+ // CHECK-LABEL: @test_mm256_broadcast_f32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x2
+ return _mm256_broadcast_f32x2(__A);
+}
+
+__m256 test_mm256_mask_broadcast_f32x2(__m256 __O, __mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcast_f32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x2
+ return _mm256_mask_broadcast_f32x2(__O, __M, __A);
+}
+
+__m256 test_mm256_maskz_broadcast_f32x2(__mmask8 __M, __m128 __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcast_f32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf32x2
+ return _mm256_maskz_broadcast_f32x2(__M, __A);
+}
+
+__m256d test_mm256_broadcast_f64x2(__m128d __A) {
+ // CHECK-LABEL: @test_mm256_broadcast_f64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf64x2
+ return _mm256_broadcast_f64x2(__A);
+}
+
+__m256d test_mm256_mask_broadcast_f64x2(__m256d __O, __mmask8 __M, __m128d __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcast_f64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf64x2
+ return _mm256_mask_broadcast_f64x2(__O, __M, __A);
+}
+
+__m256d test_mm256_maskz_broadcast_f64x2(__mmask8 __M, __m128d __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcast_f64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcastf64x2
+ return _mm256_maskz_broadcast_f64x2(__M, __A);
+}
+
+__m128i test_mm_broadcast_i32x2(__m128i __A) {
+ // CHECK-LABEL: @test_mm_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm_broadcast_i32x2(__A);
+}
+
+__m128i test_mm_mask_broadcast_i32x2(__m128i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_mask_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm_mask_broadcast_i32x2(__O, __M, __A);
+}
+
+__m128i test_mm_maskz_broadcast_i32x2(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm_maskz_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm_maskz_broadcast_i32x2(__M, __A);
+}
+
+__m256i test_mm256_broadcast_i32x2(__m128i __A) {
+ // CHECK-LABEL: @test_mm256_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm256_broadcast_i32x2(__A);
+}
+
+__m256i test_mm256_mask_broadcast_i32x2(__m256i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm256_mask_broadcast_i32x2(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_broadcast_i32x2(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcast_i32x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti32x2
+ return _mm256_maskz_broadcast_i32x2(__M, __A);
+}
+
+__m256i test_mm256_broadcast_i64x2(__m128i __A) {
+ // CHECK-LABEL: @test_mm256_broadcast_i64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti64x2
+ return _mm256_broadcast_i64x2(__A);
+}
+
+__m256i test_mm256_mask_broadcast_i64x2(__m256i __O, __mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_mask_broadcast_i64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti64x2
+ return _mm256_mask_broadcast_i64x2(__O, __M, __A);
+}
+
+__m256i test_mm256_maskz_broadcast_i64x2(__mmask8 __M, __m128i __A) {
+ // CHECK-LABEL: @test_mm256_maskz_broadcast_i64x2
+ // CHECK: @llvm.x86.avx512.mask.broadcasti64x2
+ return _mm256_maskz_broadcast_i64x2(__M, __A);
+}
More information about the cfe-commits
mailing list