r267728 - [Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} instruction set

Michael Zuckerman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 08:35:14 PDT 2016


Author: mzuckerm
Date: Wed Apr 27 10:35:13 2016
New Revision: 267728

URL: http://llvm.org/viewvc/llvm-project?rev=267728&view=rev
Log:
[Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} instruction set

Differential Revision: http://reviews.llvm.org/D19525

Modified:
    cfe/trunk/include/clang/Basic/BuiltinsX86.def
    cfe/trunk/lib/Headers/avx512vlcdintrin.h
    cfe/trunk/test/CodeGen/avx512vlcd-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=267728&r1=267727&r2=267728&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/BuiltinsX86.def (original)
+++ cfe/trunk/include/clang/Basic/BuiltinsX86.def Wed Apr 27 10:35:13 2016
@@ -1245,6 +1245,10 @@ TARGET_BUILTIN(__builtin_ia32_vpermi2var
 TARGET_BUILTIN(__builtin_ia32_vpermt2varhi512_mask, "V32sV32sV32sV32sUi", "", "avx512bw")
 TARGET_BUILTIN(__builtin_ia32_vpermt2varhi512_maskz, "V32sV32sV32sV32sUi", "", "avx512bw")
 
+TARGET_BUILTIN(__builtin_ia32_vpconflictdi_128_mask, "V2LLiV2LLiV2LLiUc","","avx512cd,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpconflictdi_256_mask, "V4LLiV4LLiV4LLiUc","","avx512cd,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpconflictsi_128_mask, "V4iV4iV4iUc","","avx512cd,avx512vl")
+TARGET_BUILTIN(__builtin_ia32_vpconflictsi_256_mask, "V8iV8iV8iUc","","avx512cd,avx512vl")
 TARGET_BUILTIN(__builtin_ia32_vpconflictdi_512_mask, "V8LLiV8LLiV8LLiUc", "", "avx512cd")
 TARGET_BUILTIN(__builtin_ia32_vpconflictsi_512_mask, "V16iV16iV16iUs", "", "avx512cd")
 TARGET_BUILTIN(__builtin_ia32_vplzcntd_512_mask, "V16iV16iV16iUs", "", "avx512cd")

Modified: cfe/trunk/lib/Headers/avx512vlcdintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512vlcdintrin.h?rev=267728&r1=267727&r2=267728&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512vlcdintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512vlcdintrin.h Wed Apr 27 10:35:13 2016
@@ -56,6 +56,104 @@ _mm256_broadcastmw_epi32 (__mmask16 __A)
 }
 
 
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_conflict_epi64 (__m128i __A)
+{
+  return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
+               (__v2di) _mm_undefined_si128 (),
+               (__mmask8) -1);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_conflict_epi64 (__m128i __W, __mmask8 __U, __m128i __A)
+{
+  return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
+               (__v2di) __W,
+               (__mmask8) __U);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_conflict_epi64 (__mmask8 __U, __m128i __A)
+{
+  return (__m128i) __builtin_ia32_vpconflictdi_128_mask ((__v2di) __A,
+               (__v2di)
+               _mm_setzero_di (),
+               (__mmask8) __U);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_conflict_epi64 (__m256i __A)
+{
+  return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
+               (__v4di)  _mm256_undefined_si256 (),
+               (__mmask8) -1);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_conflict_epi64 (__m256i __W, __mmask8 __U, __m256i __A)
+{
+  return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
+               (__v4di) __W,
+               (__mmask8) __U);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_conflict_epi64 (__mmask8 __U, __m256i __A)
+{
+  return (__m256i) __builtin_ia32_vpconflictdi_256_mask ((__v4di) __A,
+               (__v4di) _mm256_setzero_si256 (),
+               (__mmask8) __U);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_conflict_epi32 (__m128i __A)
+{
+  return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
+               (__v4si) _mm_undefined_si128 (),
+               (__mmask8) -1);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_mask_conflict_epi32 (__m128i __W, __mmask8 __U, __m128i __A)
+{
+  return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
+               (__v4si) __W,
+               (__mmask8) __U);
+}
+
+static __inline__ __m128i __DEFAULT_FN_ATTRS
+_mm_maskz_conflict_epi32 (__mmask8 __U, __m128i __A)
+{
+  return (__m128i) __builtin_ia32_vpconflictsi_128_mask ((__v4si) __A,
+               (__v4si) _mm_setzero_si128 (),
+               (__mmask8) __U);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_conflict_epi32 (__m256i __A)
+{
+  return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
+               (__v8si) _mm256_undefined_si256 (),
+               (__mmask8) -1);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_mask_conflict_epi32 (__m256i __W, __mmask8 __U, __m256i __A)
+{
+  return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
+               (__v8si) __W,
+               (__mmask8) __U);
+}
+
+static __inline__ __m256i __DEFAULT_FN_ATTRS
+_mm256_maskz_conflict_epi32 (__mmask8 __U, __m256i __A)
+{
+  return (__m256i) __builtin_ia32_vpconflictsi_256_mask ((__v8si) __A,
+               (__v8si)
+               _mm256_setzero_si256 (),
+               (__mmask8) __U);
+}
+
 #undef __DEFAULT_FN_ATTRS
 
 #endif /* __AVX512VLCDINTRIN_H */
\ No newline at end of file

Modified: cfe/trunk/test/CodeGen/avx512vlcd-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512vlcd-builtins.c?rev=267728&r1=267727&r2=267728&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512vlcd-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512vlcd-builtins.c Wed Apr 27 10:35:13 2016
@@ -28,3 +28,75 @@ __m256i test_mm256_broadcastmw_epi32(__m
   // CHECK: @llvm.x86.avx512.broadcastmw.256
   return _mm256_broadcastmw_epi32(__A); 
 }
+
+__m128i test_mm_conflict_epi64(__m128i __A) {
+  // CHECK-LABEL: @test_mm_conflict_epi64
+  // CHECK: @llvm.x86.avx512.mask.conflict.q.128
+  return _mm_conflict_epi64(__A); 
+}
+
+__m128i test_mm_mask_conflict_epi64(__m128i __W, __mmask8 __U, __m128i __A) {
+  // CHECK-LABEL: @test_mm_mask_conflict_epi64
+  // CHECK: @llvm.x86.avx512.mask.conflict.q.128
+  return _mm_mask_conflict_epi64(__W, __U, __A); 
+}
+
+__m128i test_mm_maskz_conflict_epi64(__mmask8 __U, __m128i __A) {
+  // CHECK-LABEL: @test_mm_maskz_conflict_epi64
+  // CHECK: @llvm.x86.avx512.mask.conflict.q.128
+  return _mm_maskz_conflict_epi64(__U, __A); 
+}
+
+__m256i test_mm256_conflict_epi64(__m256i __A) {
+  // CHECK-LABEL: @test_mm256_conflict_epi64
+  // CHECK: @llvm.x86.avx512.mask.conflict.q.256
+  return _mm256_conflict_epi64(__A); 
+}
+
+__m256i test_mm256_mask_conflict_epi64(__m256i __W, __mmask8 __U, __m256i __A) {
+  // CHECK-LABEL: @test_mm256_mask_conflict_epi64
+  // CHECK: @llvm.x86.avx512.mask.conflict.q.256
+  return _mm256_mask_conflict_epi64(__W, __U, __A); 
+}
+
+__m256i test_mm256_maskz_conflict_epi64(__mmask8 __U, __m256i __A) {
+  // CHECK-LABEL: @test_mm256_maskz_conflict_epi64
+  // CHECK: @llvm.x86.avx512.mask.conflict.q.256
+  return _mm256_maskz_conflict_epi64(__U, __A); 
+}
+
+__m128i test_mm_conflict_epi32(__m128i __A) {
+  // CHECK-LABEL: @test_mm_conflict_epi32
+  // CHECK: @llvm.x86.avx512.mask.conflict.d.128
+  return _mm_conflict_epi32(__A); 
+}
+
+__m128i test_mm_mask_conflict_epi32(__m128i __W, __mmask8 __U, __m128i __A) {
+  // CHECK-LABEL: @test_mm_mask_conflict_epi32
+  // CHECK: @llvm.x86.avx512.mask.conflict.d.128
+  return _mm_mask_conflict_epi32(__W, __U, __A); 
+}
+
+__m128i test_mm_maskz_conflict_epi32(__mmask8 __U, __m128i __A) {
+  // CHECK-LABEL: @test_mm_maskz_conflict_epi32
+  // CHECK: @llvm.x86.avx512.mask.conflict.d.128
+  return _mm_maskz_conflict_epi32(__U, __A); 
+}
+
+__m256i test_mm256_conflict_epi32(__m256i __A) {
+  // CHECK-LABEL: @test_mm256_conflict_epi32
+  // CHECK: @llvm.x86.avx512.mask.conflict.d.256
+  return _mm256_conflict_epi32(__A); 
+}
+
+__m256i test_mm256_mask_conflict_epi32(__m256i __W, __mmask8 __U, __m256i __A) {
+  // CHECK-LABEL: @test_mm256_mask_conflict_epi32
+  // CHECK: @llvm.x86.avx512.mask.conflict.d.256
+  return _mm256_mask_conflict_epi32(__W, __U, __A); 
+}
+
+__m256i test_mm256_maskz_conflict_epi32(__mmask8 __U, __m256i __A) {
+  // CHECK-LABEL: @test_mm256_maskz_conflict_epi32
+  // CHECK: @llvm.x86.avx512.mask.conflict.d.256
+  return _mm256_maskz_conflict_epi32(__U, __A); 
+}




More information about the cfe-commits mailing list