[PATCH] D106790: prfchwintrin.h: Make _m_prefetchw take a pointer to volatile (PR49124)

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 2 06:16:18 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG12dc13b73cf8: prfchwintrin.h: Make _m_prefetchw take a pointer to volatile (PR49124) (authored by hans).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106790/new/

https://reviews.llvm.org/D106790

Files:
  clang/lib/Headers/prfchwintrin.h


Index: clang/lib/Headers/prfchwintrin.h
===================================================================
--- clang/lib/Headers/prfchwintrin.h
+++ clang/lib/Headers/prfchwintrin.h
@@ -47,9 +47,12 @@
 /// \param __P
 ///    A pointer specifying the memory address to be prefetched.
 static __inline__ void __attribute__((__always_inline__, __nodebug__))
-_m_prefetchw(void *__P)
+_m_prefetchw(volatile const void *__P)
 {
-  __builtin_prefetch (__P, 1, 3 /* _MM_HINT_T0 */);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcast-qual"
+  __builtin_prefetch ((const void*)__P, 1, 3 /* _MM_HINT_T0 */);
+#pragma clang diagnostic pop
 }
 
 #endif /* __PRFCHWINTRIN_H */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106790.363465.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210802/a4bfc471/attachment.bin>


More information about the cfe-commits mailing list