[PATCH] D66786: [x86] Make some intrinsic functions in CLANG aligned with SPEC: _mm512_stream_ps, _mm512_stream_pd, _mm512_stream_si512

Bing Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 23:33:13 PDT 2019


yubing created this revision.
yubing added reviewers: craig.topper, pengfei, LuoYuanke.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Make some intrinsic functions in CLANG aligned with SPEC: _mm512_stream_ps, _mm512_stream_pd, _mm512_stream_si512


Repository:
  rL LLVM

https://reviews.llvm.org/D66786

Files:
  clang/lib/Headers/avx512fintrin.h
  clang/test/CodeGen/avx512f-builtins.c


Index: clang/test/CodeGen/avx512f-builtins.c
===================================================================
--- clang/test/CodeGen/avx512f-builtins.c
+++ clang/test/CodeGen/avx512f-builtins.c
@@ -8563,7 +8563,7 @@
   _store_mask16(A, _mm512_cmpneq_epu32_mask(B, C));
 }
 
-void test_mm512_stream_si512(__m512i * __P, __m512i __A) {
+void test_mm512_stream_si512(void * __P, __m512i __A) {
   // CHECK-LABEL: @test_mm512_stream_si512
   // CHECK: store <8 x i64> %{{.*}}, <8 x i64>* %{{.*}}, align 64, !nontemporal
   _mm512_stream_si512(__P, __A); 
@@ -8581,13 +8581,13 @@
   return _mm512_stream_load_si512(__P); 
 }
 
-void test_mm512_stream_pd(double *__P, __m512d __A) {
+void test_mm512_stream_pd(void *__P, __m512d __A) {
   // CHECK-LABEL: @test_mm512_stream_pd
   // CHECK: store <8 x double> %{{.*}}, <8 x double>* %{{.*}}, align 64, !nontemporal
   return _mm512_stream_pd(__P, __A); 
 }
 
-void test_mm512_stream_ps(float *__P, __m512 __A) {
+void test_mm512_stream_ps(void *__P, __m512 __A) {
   // CHECK-LABEL: @test_mm512_stream_ps
   // CHECK: store <16 x float> %{{.*}}, <16 x float>* %{{.*}}, align 64, !nontemporal
   _mm512_stream_ps(__P, __A); 
Index: clang/lib/Headers/avx512fintrin.h
===================================================================
--- clang/lib/Headers/avx512fintrin.h
+++ clang/lib/Headers/avx512fintrin.h
@@ -8436,7 +8436,7 @@
 }
 
 static __inline__ void __DEFAULT_FN_ATTRS512
-_mm512_stream_si512 (__m512i * __P, __m512i __A)
+_mm512_stream_si512 (void * __P, __m512i __A)
 {
   typedef __v8di __v8di_aligned __attribute__((aligned(64)));
   __builtin_nontemporal_store((__v8di_aligned)__A, (__v8di_aligned*)__P);
@@ -8450,14 +8450,14 @@
 }
 
 static __inline__ void __DEFAULT_FN_ATTRS512
-_mm512_stream_pd (double *__P, __m512d __A)
+_mm512_stream_pd (void *__P, __m512d __A)
 {
   typedef __v8df __v8df_aligned __attribute__((aligned(64)));
   __builtin_nontemporal_store((__v8df_aligned)__A, (__v8df_aligned*)__P);
 }
 
 static __inline__ void __DEFAULT_FN_ATTRS512
-_mm512_stream_ps (float *__P, __m512 __A)
+_mm512_stream_ps (void *__P, __m512 __A)
 {
   typedef __v16sf __v16sf_aligned __attribute__((aligned(64)));
   __builtin_nontemporal_store((__v16sf_aligned)__A, (__v16sf_aligned*)__P);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66786.217315.patch
Type: text/x-patch
Size: 2251 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190827/0d15747f/attachment.bin>


More information about the llvm-commits mailing list