r370691 - [x86] Fix bugs of some intrinsic functions in CLANG : _mm512_stream_ps, _mm512_stream_pd, _mm512_stream_si512
Pengfei Wang via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 2 19:06:15 PDT 2019
Author: pengfei
Date: Mon Sep 2 19:06:15 2019
New Revision: 370691
URL: http://llvm.org/viewvc/llvm-project?rev=370691&view=rev
Log:
[x86] Fix bugs of some intrinsic functions in CLANG : _mm512_stream_ps, _mm512_stream_pd, _mm512_stream_si512
Reviewers: craig.topper, pengfei, LuoYuanke, RKSimon, spatel
Reviewed By: RKSimon
Subscribers: llvm-commits
Patch by Bing Yu (yubing)
Differential Revision: https://reviews.llvm.org/D66786
Modified:
cfe/trunk/lib/Headers/avx512fintrin.h
cfe/trunk/test/CodeGen/avx512f-builtins.c
Modified: cfe/trunk/lib/Headers/avx512fintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512fintrin.h?rev=370691&r1=370690&r2=370691&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512fintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512fintrin.h Mon Sep 2 19:06:15 2019
@@ -8436,7 +8436,7 @@ _store_mask16(__mmask16 *__A, __mmask16
}
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 @@ _mm512_stream_load_si512 (void const *__
}
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);
Modified: cfe/trunk/test/CodeGen/avx512f-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/avx512f-builtins.c?rev=370691&r1=370690&r2=370691&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/avx512f-builtins.c (original)
+++ cfe/trunk/test/CodeGen/avx512f-builtins.c Mon Sep 2 19:06:15 2019
@@ -8575,6 +8575,12 @@ void test_mm512_stream_si512(__m512i * _
_mm512_stream_si512(__P, __A);
}
+void test_mm512_stream_si512_2(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);
+}
+
__m512i test_mm512_stream_load_si512(void *__P) {
// CHECK-LABEL: @test_mm512_stream_load_si512
// CHECK: load <8 x i64>, <8 x i64>* %{{.*}}, align 64, !nontemporal
@@ -8593,12 +8599,23 @@ void test_mm512_stream_pd(double *__P, _
return _mm512_stream_pd(__P, __A);
}
+void test_mm512_stream_pd_2(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) {
// CHECK-LABEL: @test_mm512_stream_ps
// CHECK: store <16 x float> %{{.*}}, <16 x float>* %{{.*}}, align 64, !nontemporal
_mm512_stream_ps(__P, __A);
}
+void test_mm512_stream_ps_2(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);
+}
__m512d test_mm512_mask_compress_pd(__m512d __W, __mmask8 __U, __m512d __A) {
// CHECK-LABEL: @test_mm512_mask_compress_pd
// CHECK: @llvm.x86.avx512.mask.compress
More information about the cfe-commits
mailing list