[libcxx-commits] [PATCH] D158547: [PowerPC] Exclude frexp(long double) on linux

Lei Huang via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 22 13:53:32 PDT 2023


lei created this revision.
Herald added subscribers: steven.zhang, shchenz, nemanjai.
Herald added a project: All.
lei requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

PowerPC on linux currently don't have support for lowering long double for
frexp().  Removing the tests until implementation is provided.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158547

Files:
  libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp


Index: libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp
===================================================================
--- libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp
+++ libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp
@@ -58,9 +58,14 @@
 
   ASSERT_NOT_CONSTEXPR_CXX23(std::frexp(0.0f, &DummyInt) == 0.0f);
   ASSERT_NOT_CONSTEXPR_CXX23(std::frexp(0.0, &DummyInt) == 0.0);
-  ASSERT_NOT_CONSTEXPR_CXX23(std::frexp(0.0L, &DummyInt) == 0.0L);
   ASSERT_NOT_CONSTEXPR_CXX23(std::frexpf(0.0f, &DummyInt) == 0.0f);
+
+//FIXME: currently linux powerpc does not support this expansion
+// since 0.0L lowers to ppcf128 and special handling is required.
+#if ! defined(__LONG_DOUBLE_IBM128__)
+  ASSERT_NOT_CONSTEXPR_CXX23(std::frexp(0.0L, &DummyInt) == 0.0L);
   ASSERT_NOT_CONSTEXPR_CXX23(std::frexpl(0.0L, &DummyInt) == 0.0L);
+#endif
 
   ASSERT_NOT_CONSTEXPR_CXX23(std::ilogb(1.0f) == 0);
   ASSERT_NOT_CONSTEXPR_CXX23(std::ilogb(1.0) == 0);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158547.552496.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230822/8961b3cf/attachment.bin>


More information about the libcxx-commits mailing list