[libcxx-commits] [PATCH] D60097: Fix implementation of ::abs and std::abs LWG 2192.
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 2 10:01:20 PDT 2019
mclow.lists added inline comments.
================
Comment at: include/math.h:800
+inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
+ return __builtin_fabsf(__lcpp_x);
+}
----------------
ldionne wrote:
> We were not using the builtin before -- why the change?
I agree. We can't use the intrinsics here w/o a check to see if the compiler supports them.
We'll probably want to use them in the future, when SG6 plasters `constexpr` all over `cmath`, but not right now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60097/new/
https://reviews.llvm.org/D60097
More information about the libcxx-commits
mailing list