[libcxx-commits] [libcxx] [libc++][atomic_ref] Use __atomic_fetch_{add, sub} builtins on floating-points whenever possible (PR #135685)

Patrick Fasano via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 15 11:24:45 PDT 2025


================
@@ -322,20 +322,28 @@ struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> {
   atomic_ref& operator=(const atomic_ref&) = delete;
 
   _LIBCPP_HIDE_FROM_ABI _Tp fetch_add(_Tp __arg, memory_order __order = memory_order_seq_cst) const noexcept {
+#  ifdef _LIBCPP_COMPILER_CLANG_BASED
----------------
kc9jud wrote:

Does this need this FP80 workaround? https://github.com/llvm/llvm-project/blob/d0c973a7a0149db3b71767d4c5a20a31e6a8ed5b/libcxx/include/__atomic/atomic.h#L340-L357

https://github.com/llvm/llvm-project/pull/135685


More information about the libcxx-commits mailing list