[libcxx-commits] [PATCH] D136393: [libc++][math.h] Use builtins for all the functions
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Nov 20 08:18:10 PST 2022
ldionne added inline comments.
================
Comment at: libcxx/include/math.h:1009
-inline _LIBCPP_HIDE_FROM_ABI float hypot(float __x, float __y) _NOEXCEPT {return ::hypotf(__x, __y);}
-inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y) _NOEXCEPT {return ::hypotl(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI float hypot(float __x, float __y) _NOEXCEPT {return __builtin_hypotf(__x, __y);}
+inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y) _NOEXCEPT {return __builtin_hypotl(__x, __y);}
----------------
We also define `hypot` inside `<cmath>`. Do you know why?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136393/new/
https://reviews.llvm.org/D136393
More information about the libcxx-commits
mailing list