[libcxx-commits] [libcxx] [libc++] Fix inconsistency between is_lock_free and is_always_lock_free (PR #68109)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 3 15:26:05 PDT 2023
================
@@ -21,7 +21,6 @@
template <typename T>
void checkAlwaysLockFree() {
if (std::atomic<T>::is_always_lock_free) {
- LIBCPP_ASSERT(sizeof(std::atomic<T>) == sizeof(T)); // technically not required, but libc++ does it that way
----------------
ldionne wrote:
Yes, exactly, `FloatArr3` showcases this under `arm64-apple-macos` (and probably any `arm64` target). I looked at the assembly and we do not use a lock for `FloatArr3` on arm64 so it looks like `is_lock_free` was really lying.
https://github.com/llvm/llvm-project/pull/68109
More information about the libcxx-commits
mailing list