Re: [PATCH] D21322: [Clang][avx512][Intrinsics] adding prefetch gather intrinsics

2016-06-14 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL272667: [Clang][avx512][Intrinsics] adding prefetch gather 
intrinsics (authored by mzuckerm).

Changed prior to commit:
  http://reviews.llvm.org/D21322?vs=60663=60678#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D21322

Files:
  cfe/trunk/lib/Headers/avx512pfintrin.h
  cfe/trunk/test/CodeGen/avx512pf-builtins.c

Index: cfe/trunk/test/CodeGen/avx512pf-builtins.c
===
--- cfe/trunk/test/CodeGen/avx512pf-builtins.c
+++ cfe/trunk/test/CodeGen/avx512pf-builtins.c
@@ -11,24 +11,48 @@
   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
Index: cfe/trunk/lib/Headers/avx512pfintrin.h
===
--- cfe/trunk/lib/Headers/avx512pfintrin.h
+++ cfe/trunk/lib/Headers/avx512pfintrin.h
@@ -35,21 +35,40 @@
   __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), 

Re: [PATCH] D21322: [Clang][avx512][Intrinsics] adding prefetch gather intrinsics

2016-06-14 Thread Igor Breger via cfe-commits
igorb accepted this revision.
igorb added a comment.
This revision is now accepted and ready to land.

LGTM


http://reviews.llvm.org/D21322



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D21322: [Clang][avx512][Intrinsics] adding prefetch gather intrinsics

2016-06-14 Thread michael zuckerman via cfe-commits
m_zuckerman created this revision.
m_zuckerman added reviewers: AsafBadouh, igorb, delena.
m_zuckerman added a subscriber: cfe-commits.

_mm512_prefetch_i64gather_ps
_mm512_prefetch_i32gather_pd
_mm512_prefetch_i64gather_pd
_mm512_prefetch_i32gather_ps

http://reviews.llvm.org/D21322

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

Index: lib/Headers/avx512pfintrin.h
===
--- lib/Headers/avx512pfintrin.h
+++ lib/Headers/avx512pfintrin.h
@@ -35,21 +35,40 @@
   __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: test/CodeGen/avx512pf-builtins.c
===
--- test/CodeGen/avx512pf-builtins.c
+++ test/CodeGen/avx512pf-builtins.c
@@ -11,24 +11,48 @@
   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