]> granicus.if.org Git - clang/commitdiff
[Clang][avx512][Intrinsics] adding prefetch gather intrinsics
authorMichael Zuckerman <Michael.zuckerman@intel.com>
Tue, 14 Jun 2016 13:45:17 +0000 (13:45 +0000)
committerMichael Zuckerman <Michael.zuckerman@intel.com>
Tue, 14 Jun 2016 13:45:17 +0000 (13:45 +0000)
Differential Revision: http://reviews.llvm.org/D21322

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272667 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/avx512pfintrin.h
test/CodeGen/avx512pf-builtins.c

index 66c64f46152fb836879a70020475140e966e1580..c7fa3cf313e327b9894b73bb48f4b1af5cc291d3 100644 (file)
   __builtin_ia32_gatherpfdpd((__mmask8)(mask), (__v8si)(__m256i)(index), \
                              (long long const *)(addr), (int)(scale), \
                              (int)(hint)); })
+              
+#define _mm512_prefetch_i32gather_pd(index, addr, scale, hint) __extension__ ({\
+  __builtin_ia32_gatherpfdpd((__mmask8) -1, (__v8si)(__m256i)(index), \
+                             (long long const *)(addr), (int)(scale), \
+                             (int)(hint)); })
 
 #define _mm512_mask_prefetch_i32gather_ps(index, mask, addr, scale, hint) ({\
   __builtin_ia32_gatherpfdps((__mmask16)(mask), \
                              (__v16si)(__m512i)(index), (int const *)(addr), \
                              (int)(scale), (int)(hint)); })
 
+#define _mm512_prefetch_i32gather_ps(index, addr, scale, hint) ({\
+  __builtin_ia32_gatherpfdps((__mmask16) -1, \
+                             (__v16si)(__m512i)(index), (int const *)(addr), \
+                             (int)(scale), (int)(hint)); })
+
 #define _mm512_mask_prefetch_i64gather_pd(index, mask, addr, scale, hint) __extension__ ({\
   __builtin_ia32_gatherpfqpd((__mmask8)(mask), (__v8di)(__m512i)(index), \
                              (long long const *)(addr), (int)(scale), \
                              (int)(hint)); })
 
+#define _mm512_prefetch_i64gather_pd(index, addr, scale, hint) __extension__ ({\
+  __builtin_ia32_gatherpfqpd((__mmask8) -1, (__v8di)(__m512i)(index), \
+                             (long long const *)(addr), (int)(scale), \
+                             (int)(hint)); })
+              
 #define _mm512_mask_prefetch_i64gather_ps(index, mask, addr, scale, hint) ({\
   __builtin_ia32_gatherpfqps((__mmask8)(mask), (__v8di)(__m512i)(index), \
                              (int const *)(addr), (int)(scale), (int)(hint)); })
 
+#define _mm512_prefetch_i64gather_ps(index, addr, scale, hint) ({\
+  __builtin_ia32_gatherpfqps((__mmask8) -1, (__v8di)(__m512i)(index), \
+                             (int const *)(addr), (int)(scale), (int)(hint)); })
+
 #define _mm512_prefetch_i32scatter_pd(addr, index, scale, hint) __extension__ ({\
   __builtin_ia32_scatterpfdpd((__mmask8)-1, (__v8si)(__m256i)(index), \
                               (long long *)(addr), (int)(scale), \
index 91140f14946aff282ef7f2a0507f2478aab53ae5..16b27e915136a9bc38e7973816027386b86468e9 100644 (file)
@@ -11,24 +11,48 @@ void test_mm512_mask_prefetch_i32gather_pd(__m256i index, __mmask8 mask, void co
   return _mm512_mask_prefetch_i32gather_pd(index, mask, addr, 2, 1); 
 }
 
+void test_mm512_prefetch_i32gather_pd(__m256i index, void const *addr, int hint) {
+  // CHECK-LABEL: @test_mm512_prefetch_i32gather_pd
+  // CHECK: @llvm.x86.avx512.gatherpf.dpd
+  return _mm512_prefetch_i32gather_pd(index, addr, 2, 1); 
+}
+
 void test_mm512_mask_prefetch_i32gather_ps(__m512i index, __mmask16 mask, void const *addr, int hint) {
   // CHECK-LABEL: @test_mm512_mask_prefetch_i32gather_ps
   // CHECK: @llvm.x86.avx512.gatherpf.dps
   return _mm512_mask_prefetch_i32gather_ps(index, mask, addr, 2, 1); 
 }
 
+void test_mm512_prefetch_i32gather_ps(__m512i index,  void const *addr, int hint) {
+  // CHECK-LABEL: @test_mm512_prefetch_i32gather_ps
+  // CHECK: @llvm.x86.avx512.gatherpf.dps
+  return _mm512_prefetch_i32gather_ps(index, addr, 2, 1); 
+}
+
 void test_mm512_mask_prefetch_i64gather_pd(__m512i index, __mmask8 mask, void const *addr, int hint) {
   // CHECK-LABEL: @test_mm512_mask_prefetch_i64gather_pd
   // CHECK: @llvm.x86.avx512.gatherpf.qpd
   return _mm512_mask_prefetch_i64gather_pd(index, mask, addr, 2, 1); 
 }
 
+void test_mm512_prefetch_i64gather_pd(__m512i index, void const *addr, int hint) {
+  // CHECK-LABEL: @test_mm512_prefetch_i64gather_pd
+  // CHECK: @llvm.x86.avx512.gatherpf.qpd
+  return _mm512_prefetch_i64gather_pd(index, addr, 2, 1); 
+}
+
 void test_mm512_mask_prefetch_i64gather_ps(__m512i index, __mmask8 mask, void const *addr, int hint) {
   // CHECK-LABEL: @test_mm512_mask_prefetch_i64gather_ps
   // CHECK: @llvm.x86.avx512.gatherpf.qps
   return _mm512_mask_prefetch_i64gather_ps(index, mask, addr, 2, 1); 
 }
 
+void test_mm512_prefetch_i64gather_ps(__m512i index, void const *addr, int hint) {
+  // CHECK-LABEL: @test_mm512_prefetch_i64gather_ps
+  // CHECK: @llvm.x86.avx512.gatherpf.qps
+  return _mm512_prefetch_i64gather_ps(index, addr, 2, 1); 
+}
+
 void test_mm512_prefetch_i32scatter_pd(void *addr, __m256i index) {
   // CHECK-LABEL: @test_mm512_prefetch_i32scatter_pd
   // CHECK: @llvm.x86.avx512.scatterpf.dpd.512