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

2021-08-02 Thread Hans Wennborg via Phabricator via cfe-commits
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 CHAN

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

2021-07-28 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. In D106790#2909567 , @hans wrote: > I don't think that should cause any problems. Passing a less qualified > pointer to a more cv-qualified parameter should

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

2021-07-28 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. > Sure, they won't be included together, but will GCC users get warnings from > passing non-volatile pointers to `_mm_prefetchw`? If we change these > qualifiers to match MSVC, will GCC/Clang users be able to observe any change > in behavior? I don't think that should cau

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

2021-07-27 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D106790#2906762 , @hans wrote: > In D106790#2905110 , @rnk wrote: > >> Does this match GCC? They also provide this Intel intrinsic. > > No, they define it without volatile (and also without

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

2021-07-27 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D106790#2905110 , @rnk wrote: > Does this match GCC? They also provide this Intel intrinsic. No, they define it without volatile (and also without const): https://github.com/gcc-mirror/gcc/blob/releases/gcc-11.1.0/gcc/config/i38

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

2021-07-26 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/prfchwintrin.h:54 +#pragma clang diagnostic ignored "-Wcast-qual" + __builtin_prefetch ((const void*)__P, 1, 3 /* _MM_HINT_T0 */); +#pragma clang diagnostic pop Can we declare `__builtin_prefetch` to v

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

2021-07-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Does this match GCC? They also provide this Intel intrinsic. Seems reasonable in principle, though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106790/new/ https://reviews.llvm.org/D106790 __

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

2021-07-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added reviewers: thakis, rnk. hans requested review of this revision. Herald added a project: clang. For some reason, Microsoft declares _m_prefetch to take a const void*, but _m_prefetchw to take a /volatile/ const void*. I can't think of any downside to just ca