[libcxx-commits] [PATCH] D136393: [libc++][math.h] Use builtins for all the functions
Xing Xue via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 10 08:32:05 PST 2022
xingxue added inline comments.
================
Comment at: libcxx/include/math.h:686
+#ifdef _AIX
+ return ::ldexpl(__x, __e);
+#else
----------------
ldionne wrote:
> Is there a reason why this builtin doesn't work correctly on AIX?
>
> @daltenty @xingxue Can you get someone to fix this? When we try to make those `constexpr`, things could start failing pretty badly on AIX if we're not using builtins.
The issue is that AIX implements math functions `frexpl()`, `ldexpl()`, and `modfl()` as 128-bit `long double` but for other math functions, AIX libm has 64-bit `long double` wrappers. Currently, the Clang compiler on AIX supports 64-bit `long double` only and therefore, `frexpl()`, `ldexpl()`, and `modfl()` would seg-fault. We are looking into a fix.
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