[libc-commits] [libc] [libc][math][c23] Add dadd{l, f128} and ddiv{l, f128} C23 math functions (PR #100456)

via libc-commits libc-commits at lists.llvm.org
Thu Aug 1 13:18:18 PDT 2024


================
@@ -0,0 +1,13 @@
+//===-- Unittests for ddivl -----------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "DivTest.h"
+
+#include "src/math/ddivl.h"
+
+LIST_ADD_TESTS(double, long double, LIBC_NAMESPACE::ddivl)
----------------
overmighty wrote:

You should see a warning message saying "Math tests using MPFR will be skipped" in the CMake configuration output by the way. You can apply this patch and check the CMake configuration output to try to debug the issue:

```diff
diff --git a/libc/cmake/modules/LLVMLibCCheckMPFR.cmake b/libc/cmake/modules/LLVMLibCCheckMPFR.cmake
index a27c2dc0c030..3672d25d1378 100644
--- a/libc/cmake/modules/LLVMLibCCheckMPFR.cmake
+++ b/libc/cmake/modules/LLVMLibCCheckMPFR.cmake
@@ -14,5 +14,7 @@ else()
     ${LIBC_SOURCE_DIR}/utils/MPFRWrapper/check_mpfr.cpp
     LINK_LIBRARIES
       -lmpfr -lgmp -latomic
+    OUTPUT_VARIABLE foo
   )
+  message(WARNING ${foo})
 endif()
```

https://github.com/llvm/llvm-project/pull/100456


More information about the libc-commits mailing list