[libc-commits] [libc] ee5d572 - [libc] Undo accidental changes to `dsubl` that were leftoever
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Aug 12 11:16:59 PDT 2024
Author: Joseph Huber
Date: 2024-08-12T13:16:38-05:00
New Revision: ee5d572718f7bb07f89b69df393b28a89033a5ca
URL: https://github.com/llvm/llvm-project/commit/ee5d572718f7bb07f89b69df393b28a89033a5ca
DIFF: https://github.com/llvm/llvm-project/commit/ee5d572718f7bb07f89b69df393b28a89033a5ca.diff
LOG: [libc] Undo accidental changes to `dsubl` that were leftoever
Added:
Modified:
libc/src/math/generic/CMakeLists.txt
libc/src/math/generic/daddl.cpp
libc/src/math/generic/dsubl.cpp
Removed:
################################################################################
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index d75284678f8a20..79ba07616e507f 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -138,7 +138,6 @@ add_entrypoint_object(
COMPILE_OPTIONS
-O3
DEPENDS
- libc.src.__support.macros.properties.types
libc.src.__support.FPUtil.generic.add_sub
)
@@ -251,7 +250,6 @@ add_entrypoint_object(
HDRS
../dsubl.h
DEPENDS
- libc.src.__support.macros.properties.types
libc.src.__support.FPUtil.generic.add_sub
COMPILE_OPTIONS
-O3
diff --git a/libc/src/math/generic/daddl.cpp b/libc/src/math/generic/daddl.cpp
index a47a43df722502..708de3833869c3 100644
--- a/libc/src/math/generic/daddl.cpp
+++ b/libc/src/math/generic/daddl.cpp
@@ -10,16 +10,11 @@
#include "src/__support/FPUtil/generic/add_sub.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include "src/__support/macros/properties/types.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(double, daddl, (long double x, long double y)) {
-#ifdef LIBC_TYPES_LONG_DOUBLE_IS_FLOAT64
- return static_cast<double>(x) + static_cast<double>(y);
-#else
return fputil::generic::add<double>(x, y);
-#endif
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/dsubl.cpp b/libc/src/math/generic/dsubl.cpp
index f1e6cb917da566..8b567d0869d2a3 100644
--- a/libc/src/math/generic/dsubl.cpp
+++ b/libc/src/math/generic/dsubl.cpp
@@ -10,16 +10,11 @@
#include "src/__support/FPUtil/generic/add_sub.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include "src/__support/macros/properties/types.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(double, dsubl, (long double x, long double y)) {
-#ifdef LIBC_TYPES_LONG_DOUBLE_IS_FLOAT64
- return static_cast<double>(x) - static_cast<double>(y);
-#else
- return fputil::generic::add<double>(x, y);
-#endif
+ return fputil::generic::sub<double>(x, y);
}
} // namespace LIBC_NAMESPACE_DECL
More information about the libc-commits
mailing list