[libcxx-commits] [PATCH] D119246: [libcxx][AIX][PowerPC] Disable workaround for PR31864 on powerpc
Kai Luo via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 8 07:22:13 PST 2022
lkail created this revision.
lkail added reviewers: libc++, daltenty, jsji, ldionne.
Herald added subscribers: steven.zhang, pengfei, shchenz, nemanjai.
lkail requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
IIUC, this workaround is for x86 to solve inconsistency between clang defined `__GCC_ATOMIC_LLONG_LOCK_FREE`(or `__CLANG_ATOMIC_LLONG_LOCK_FREE`) and `__atomic_always_lock_free(8, 0)`, i.e., for x86 cpu >= i586, `__GCC_ATOMIC_LLONG_LOCK_FREE` equals to 1(somes-lockfree), but `__atomic_always_lock_free(8, 0)` returns `true`. See https://github.com/llvm/llvm-project/issues/31212.
This looks not an issue for powerpc.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119246
Files:
libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
Index: libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
===================================================================
--- libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
+++ libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
@@ -8,9 +8,6 @@
//
// UNSUPPORTED: c++03, c++11, c++14
-// Fails for 32-bit builds.
-// UNSUPPORTED: LIBCXX-AIX-FIXME
-
// <atomic>
// static constexpr bool is_always_lock_free;
@@ -33,7 +30,7 @@
// which causes ATOMIC_LLONG_LOCK_FREE to be defined as '1' in 32-bit builds
// even though __atomic_always_lock_free returns true for the same type.
constexpr bool NeedWorkaroundForPR31864 =
-#if defined(__clang__)
+#if defined(__clang__) && !defined(__powerpc__)
(sizeof(void*) == 4); // Needed on 32 bit builds
#else
false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119246.406814.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220208/8a509a03/attachment.bin>
More information about the libcxx-commits
mailing list