[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
Mon Jul 29 13:02:17 PDT 2024


================
@@ -44,6 +44,62 @@ add_fp_unittest(
     libc.src.__support.FPUtil.fp_bits
 )
 
+
+add_fp_unittest(
+  daddl_test
+  NEED_MPFR
+  SUITE
+    libc-math-unittests
+  SRCS
+    daddl_test.cpp
+  HDRS
+    AddTest.h
+  DEPENDS
+    libc.src.math.daddl
+)
+
+add_fp_unittest(
+  daddf128_test
+  NEED_MPFR
+  SUITE
+    libc-math-unittests
+  SRCS
+    daddf128_test.cpp
+  HDRS
+    AddTest.h
+  DEPENDS
+    libc.src.math.daddf128
+    libc.src.__support.FPUtil.generic.add_sub
+)
+
+add_fp_unittest(
+  ddivf128_test
+  NEED_MPFR
+  SUITE
+    libc-math-unittests
+  SRCS
+    ddivf128_test.cpp
+  HDRS
+    DivTest.h
+  DEPENDS
+    libc.src.__support.FPUtil.generic.div
+    libc.src.math.ddivf128
+)
+
+add_fp_unittest(
+  ddivf128_test
+  NEED_MPFR
+  SUITE
+    libc-math-unittests
+  SRCS
+    ddivf128_test.cpp
+  HDRS
+    DivTest.h
+  DEPENDS
+    libc.src.__support.FPUtil.generic.div
+    libc.src.math.ddivf128
----------------
overmighty wrote:

None of the tests directly depend on the FPUtil.generic.* stuff. Not just `daddl_test`.

```suggestion
  DEPENDS
    libc.src.math.daddf128
)

add_fp_unittest(
  ddivf128_test
  NEED_MPFR
  SUITE
    libc-math-unittests
  SRCS
    ddivf128_test.cpp
  HDRS
    DivTest.h
  DEPENDS
    libc.src.math.ddivf128
)

add_fp_unittest(
  ddivf128_test
  NEED_MPFR
  SUITE
    libc-math-unittests
  SRCS
    ddivf128_test.cpp
  HDRS
    DivTest.h
  DEPENDS
    libc.src.math.ddivf128
```

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


More information about the libc-commits mailing list