[libcxx-commits] [PATCH] D137499: [libc++][math.h] Remove __libcpp_<func> functions and instead call builtins directly
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 8 07:46:08 PST 2022
philnik added inline comments.
================
Comment at: libcxx/include/math.h:532
-_LIBCPP_HIDE_FROM_ABI bool __libcpp_isgreater(_A1 __x, _A2 __y) _NOEXCEPT {
- return isgreater(__x, __y);
-}
----------------
Mordante wrote:
> This one and the next ones didn't call a `__builtin`. Does this work on all supported platforms?
I think the builtin just resolves to either a compiler-rt/libgcc function call or an instruction on most (all?) platforms. At least on x86, armv7 and powerpc64: https://godbolt.org/z/8cb4z98hz, so I think it's fine. In [glibc](https://github.com/bminor/glibc/blob/master/math/math.h#L1305-L1310) the normal functions are just aliases to the builtins.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137499/new/
https://reviews.llvm.org/D137499
More information about the libcxx-commits
mailing list