[PATCH] D37449: [X86][AVX512] _mm512_stream_load_si512 should take a void const* argument (PR33977)
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 4 12:17:07 PDT 2017
RKSimon created this revision.
Based off the Intel Intrinsics guide, we should expect a void const* argument.
Prevents 'passing 'const void *' to parameter of type 'void *' discards qualifiers' warnings.
Repository:
rL LLVM
https://reviews.llvm.org/D37449
Files:
lib/Headers/avx512fintrin.h
test/CodeGen/avx512f-builtins.c
Index: test/CodeGen/avx512f-builtins.c
===================================================================
--- test/CodeGen/avx512f-builtins.c
+++ test/CodeGen/avx512f-builtins.c
@@ -6258,6 +6258,12 @@
return _mm512_stream_load_si512(__P);
}
+__m512i test_mm512_stream_load_si512_const(void const *__P) {
+ // CHECK-LABEL: @test_mm512_stream_load_si512_const
+ // CHECK: load <8 x i64>, <8 x i64>* %{{.*}}, align 64, !nontemporal
+ return _mm512_stream_load_si512(__P);
+}
+
void test_mm512_stream_pd(double *__P, __m512d __A) {
// CHECK-LABEL: @test_mm512_stream_pd
// CHECK: store <8 x double> %{{.*}}, <8 x double>* %{{.*}}, align 64, !nontemporal
Index: lib/Headers/avx512fintrin.h
===================================================================
--- lib/Headers/avx512fintrin.h
+++ lib/Headers/avx512fintrin.h
@@ -9040,7 +9040,7 @@
}
static __inline__ __m512i __DEFAULT_FN_ATTRS
-_mm512_stream_load_si512 (void *__P)
+_mm512_stream_load_si512 (void const *__P)
{
typedef __v8di __v8di_aligned __attribute__((aligned(64)));
return (__m512i) __builtin_nontemporal_load((const __v8di_aligned *)__P);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37449.113786.patch
Type: text/x-patch
Size: 1154 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170904/ef19aa19/attachment.bin>
More information about the cfe-commits
mailing list