[libc-commits] [libc] [llvm] [libc][math] Adds total ordering functions for float80 (PR #238685)
via libc-commits
libc-commits at lists.llvm.org
Tue Nov 3 22:15:25 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libc/shared/math/totalorderf80.h libc/shared/math/totalordermagf80.h libc/src/__support/math/totalorderf80.h libc/src/__support/math/totalordermagf80.h libc/src/math/generic/totalorderf80.cpp libc/src/math/generic/totalordermagf80.cpp libc/src/math/totalorderf80.h libc/src/math/totalordermagf80.h libc/test/src/math/smoke/totalorderf80_test.cpp libc/test/src/math/smoke/totalordermagf80_test.cpp libc/shared/math.h libc/test/shared/shared_math_constexpr_test.cpp libc/test/shared/shared_math_test.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/shared/math.h b/libc/shared/math.h
index c7a99047d..5c9dffcb5 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -505,15 +505,15 @@
#include "math/totalorderbf16.h"
#include "math/totalorderf.h"
#include "math/totalorderf128.h"
-#include "math/totalorderf80.h"
#include "math/totalorderf16.h"
+#include "math/totalorderf80.h"
#include "math/totalorderl.h"
#include "math/totalordermag.h"
#include "math/totalordermagbf16.h"
#include "math/totalordermagf.h"
#include "math/totalordermagf128.h"
-#include "math/totalordermagf80.h"
#include "math/totalordermagf16.h"
+#include "math/totalordermagf80.h"
#include "math/totalordermagl.h"
#include "math/trunc.h"
#include "math/truncbf16.h"
diff --git a/libc/src/__support/math/totalordermagf80.h b/libc/src/__support/math/totalordermagf80.h
index 29003d69e..e9388d810 100644
--- a/libc/src/__support/math/totalordermagf80.h
+++ b/libc/src/__support/math/totalordermagf80.h
@@ -23,8 +23,7 @@ namespace math {
using LIBC_NAMESPACE::fputil::Float80;
-LIBC_INLINE constexpr int totalordermagf80(const Float80 *x,
- const Float80 *y) {
+LIBC_INLINE constexpr int totalordermagf80(const Float80 *x, const Float80 *y) {
return static_cast<int>(fputil::totalordermag(*x, *y));
}
diff --git a/libc/src/math/generic/totalorderf80.cpp b/libc/src/math/generic/totalorderf80.cpp
index f39adb1a4..ccc56777b 100644
--- a/libc/src/math/generic/totalorderf80.cpp
+++ b/libc/src/math/generic/totalorderf80.cpp
@@ -19,8 +19,7 @@ namespace LIBC_NAMESPACE_DECL {
using LIBC_NAMESPACE::fputil::Float80;
-LLVM_LIBC_FUNCTION(int, totalorderf80,
- (const float80 *x, const float80 *y)) {
+LLVM_LIBC_FUNCTION(int, totalorderf80, (const float80 *x, const float80 *y)) {
Float80 x_f80 = cpp::bit_cast<Float80>(*x);
Float80 y_f80 = cpp::bit_cast<Float80>(*y);
return math::totalorderf80(&x_f80, &y_f80);
``````````
</details>
https://github.com/llvm/llvm-project/pull/238685
More information about the libc-commits
mailing list