[libc-commits] [libc] [libc] Initial support so that libc-shared-tests can be built with pp64le (PR #188882)
Alexey Samsonov via libc-commits
libc-commits at lists.llvm.org
Thu Mar 26 18:46:03 PDT 2026
================
@@ -76,8 +79,10 @@ LIBC_INLINE static constexpr cpp::enable_if_t<
sqrt(InType x) {
if constexpr (internal::SpecialLongDouble<OutType>::VALUE &&
internal::SpecialLongDouble<InType>::VALUE) {
+#ifdef LIBC_TYPES_LONG_DOUBLE_IS_X86_FLOAT80
----------------
vonosmas wrote:
This is a bit confusing - I believe this branch would never be hit on powerpc because `SpecialLongDouble` is always false? Because if not then the function falls through w/o returning.
Maybe this can be refactored as
```
#ifdef LIBC_TYPES_LONG_DOUBLE_IS_X86_FLOAT80
if constexpr(...) {
return x86::sqrt(x);
}
#endif
// Remove else and reduce indentation in the remaining block.
https://github.com/llvm/llvm-project/pull/188882
More information about the libc-commits
mailing list