[libcxx-commits] [libcxx] [libcxx] p3008 atomic fp min/max (PR #186716)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 21 10:36:07 PDT 2026
================
@@ -372,6 +378,44 @@ struct atomic<_Tp> : __atomic_base<_Tp> {
return __rmw_op(std::forward<_This>(__self), __operand, __m, __minus, __builtin_op);
}
+ template <class _This>
+ _LIBCPP_HIDE_FROM_ABI static _Tp __fetch_min(_This&& __self, _Tp __operand, memory_order __m) {
+ auto __op = [](_Tp __a, _Tp __b) { return std::__math::fmin(__a, __b); };
----------------
huixie90 wrote:
have you created the bug report for clang yet? Regardless which approach we are going here , I think it is a good idea to fix it. I guess the clang codegen itself is OK as there is an instruction to do this in LLVM IR. is the bug in the backend?
https://github.com/llvm/llvm-project/pull/186716
More information about the libcxx-commits
mailing list