[libc-commits] [libc] [libc][math][c23] reverting dsubl (PR #101418)

via libc-commits libc-commits at lists.llvm.org
Wed Jul 31 15:04:03 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (aaryanshukla)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/101418.diff


15 Files Affected:

- (modified) libc/config/darwin/arm/entrypoints.txt (+1-1) 
- (modified) libc/config/linux/aarch64/entrypoints.txt (+1-1) 
- (modified) libc/config/linux/arm/entrypoints.txt (+1-1) 
- (modified) libc/config/linux/riscv/entrypoints.txt (+1-1) 
- (modified) libc/config/linux/x86_64/entrypoints.txt (+1-1) 
- (modified) libc/config/windows/entrypoints.txt (+1-1) 
- (modified) libc/spec/stdc.td (-1) 
- (modified) libc/src/math/CMakeLists.txt (-1) 
- (removed) libc/src/math/dsubl.h (-20) 
- (modified) libc/src/math/generic/CMakeLists.txt (-12) 
- (removed) libc/src/math/generic/dsubl.cpp (-20) 
- (modified) libc/test/src/math/CMakeLists.txt (-14) 
- (removed) libc/test/src/math/dsubl_test.cpp (-13) 
- (modified) libc/test/src/math/smoke/CMakeLists.txt (-14) 
- (removed) libc/test/src/math/smoke/dsubl_test.cpp (-13) 


``````````diff
diff --git a/libc/config/darwin/arm/entrypoints.txt b/libc/config/darwin/arm/entrypoints.txt
index 13280d2dd56d4..340b6489e0200 100644
--- a/libc/config/darwin/arm/entrypoints.txt
+++ b/libc/config/darwin/arm/entrypoints.txt
@@ -138,7 +138,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cospif
     libc.src.math.dfmal
     libc.src.math.dsqrtl
-    libc.src.math.dsubl
+    #libc.src.math.dsubl
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.expf
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 2003f6929d5cb..6595c458cc226 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -364,7 +364,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
-    libc.src.math.dsubl
+    #libc.src.math.dsubl
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.exp10
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index d691f63a78e4b..5a564f628b635 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -230,7 +230,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.coshf
     libc.src.math.dfmal
     libc.src.math.dsqrtl
-    libc.src.math.dsubl
+    #libc.src.math.dsubl
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.exp10
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index c229a11b5bb52..c551d7dfd4a92 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -386,7 +386,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
-    libc.src.math.dsubl
+    #libc.src.math.dsubl
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.exp10
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 533d0cd368863..e3a13d086ebce 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -386,7 +386,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.dfmal
     libc.src.math.dmull
     libc.src.math.dsqrtl
-    libc.src.math.dsubl
+    #libc.src.math.dsubl
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.exp10
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index e45219a9070e3..e671c9967a2eb 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -134,7 +134,7 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.cosf
     libc.src.math.coshf
     libc.src.math.dfmal
-    libc.src.math.dsubl
+    #libc.src.math.dsubl
     libc.src.math.erff
     libc.src.math.exp
     libc.src.math.expf
diff --git a/libc/spec/stdc.td b/libc/spec/stdc.td
index f3b8db598c4a1..dfd700f578989 100644
--- a/libc/spec/stdc.td
+++ b/libc/spec/stdc.td
@@ -398,7 +398,6 @@ def StdC : StandardSpec<"stdc"> {
           GuardedFunctionSpec<"ceilf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
 
           FunctionSpec<"dfmal", RetValSpec<DoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
-          FunctionSpec<"dsubl", RetValSpec<DoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<LongDoubleType>]>,
           
           FunctionSpec<"fabs", RetValSpec<DoubleType>, [ArgSpec<DoubleType>], [ConstAttr]>,
           FunctionSpec<"fabsf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index 42126e01898fe..66f2401d19093 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -95,7 +95,6 @@ add_math_entrypoint_object(dfmaf128)
 add_math_entrypoint_object(dsqrtl)
 add_math_entrypoint_object(dsqrtf128)
 
-add_math_entrypoint_object(dsubl)
 add_math_entrypoint_object(dsubf128)
 
 add_math_entrypoint_object(erf)
diff --git a/libc/src/math/dsubl.h b/libc/src/math/dsubl.h
deleted file mode 100644
index a512bbe06d4e8..0000000000000
--- a/libc/src/math/dsubl.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- Implementation header for dsubl -------------------------*- C++ -*-===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_MATH_DSUBL_H
-#define LLVM_LIBC_SRC_MATH_DSUBL_H
-
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-double dsubl(long double x, long double y);
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_MATH_DSUBL_H
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 96c8e3520d5e2..804d4d38dc14e 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -193,18 +193,6 @@ add_entrypoint_object(
     -O3
 )
 
-add_entrypoint_object(
-  dsubl
-  SRCS
-    dsubl.cpp
-  HDRS
-    ../dsubl.h
-  DEPENDS
-    libc.src.__support.FPUtil.generic.add_sub
-  COMPILE_OPTIONS
-    -O3
-)
-
 add_header_library(
   range_reduction
   HDRS
diff --git a/libc/src/math/generic/dsubl.cpp b/libc/src/math/generic/dsubl.cpp
deleted file mode 100644
index 8b567d0869d2a..0000000000000
--- a/libc/src/math/generic/dsubl.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- Implementation of dsubl function ----------------------------------===//
-//
-// 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 "src/math/dsubl.h"
-#include "src/__support/FPUtil/generic/add_sub.h"
-#include "src/__support/common.h"
-#include "src/__support/macros/config.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(double, dsubl, (long double x, long double y)) {
-  return fputil::generic::sub<double>(x, y);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index cc5955903b20d..92dc16365bba5 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -2406,20 +2406,6 @@ add_fp_unittest(
     libc.src.stdlib.srand
 )
 
-add_fp_unittest(
-  dsubl_test
-  NEED_MPFR
-  SUITE
-    libc-math-unittests
-  SRCS
-    dsubl_test.cpp
-  HDRS
-    SubTest.h
-  DEPENDS
-    libc.src.math.dsubl
-)
-
-
 add_subdirectory(generic)
 add_subdirectory(smoke)
 
diff --git a/libc/test/src/math/dsubl_test.cpp b/libc/test/src/math/dsubl_test.cpp
deleted file mode 100644
index 98846e0b6e3b3..0000000000000
--- a/libc/test/src/math/dsubl_test.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- Unittests for dsubl -----------------------------------------------===//
-//
-// 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 "SubTest.h"
-
-#include "src/math/dsubl.h"
-
-LIST_SUB_TESTS(double, long double, LIBC_NAMESPACE::dsubl)
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index c826604225848..a0333cf0389ab 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -382,20 +382,6 @@ add_fp_unittest(
     libc.src.math.dfmaf128
 )
 
-add_fp_unittest(
-  dsubl_test
-  SUITE
-    libc-math-smoke-tests
-  SRCS
-    dsubl_test.cpp
-  HDRS
-    SubTest.h
-  DEPENDS
-    libc.src.errno.errno
-    libc.hdr.fenv_macros
-    libc.src.math.dsubl
-)
-
 add_fp_unittest(
   dsubf128_test
   SUITE
diff --git a/libc/test/src/math/smoke/dsubl_test.cpp b/libc/test/src/math/smoke/dsubl_test.cpp
deleted file mode 100644
index 98846e0b6e3b3..0000000000000
--- a/libc/test/src/math/smoke/dsubl_test.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-//===-- Unittests for dsubl -----------------------------------------------===//
-//
-// 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 "SubTest.h"
-
-#include "src/math/dsubl.h"
-
-LIST_SUB_TESTS(double, long double, LIBC_NAMESPACE::dsubl)

``````````

</details>


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


More information about the libc-commits mailing list