[llvm-branch-commits] [libc] [llvm] [libc][math] Adds classification functions for float80 (PR #238686)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Nov 3 22:16:08 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/canonicalizef80.h libc/shared/math/iscanonicalf80.h libc/shared/math/isnanf80.h libc/shared/math/issignalingf80.h libc/src/__support/math/canonicalizef80.h libc/src/__support/math/iscanonicalf80.h libc/src/__support/math/isnanf80.h libc/src/__support/math/issignalingf80.h libc/src/math/canonicalizef80.h libc/src/math/generic/canonicalizef80.cpp libc/src/math/generic/iscanonicalf80.cpp libc/src/math/generic/isnanf80.cpp libc/src/math/generic/issignalingf80.cpp libc/src/math/iscanonicalf80.h libc/src/math/isnanf80.h libc/src/math/issignalingf80.h libc/test/src/math/smoke/canonicalizef80_test.cpp libc/test/src/math/smoke/iscanonicalf80_test.cpp libc/test/src/math/smoke/isnanf80_test.cpp libc/test/src/math/smoke/issignalingf80_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 28ddc0a30..1bf0723ff 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -63,8 +63,8 @@
 #include "math/canonicalizebf16.h"
 #include "math/canonicalizef.h"
 #include "math/canonicalizef128.h"
-#include "math/canonicalizef80.h"
 #include "math/canonicalizef16.h"
+#include "math/canonicalizef80.h"
 #include "math/canonicalizel.h"
 #include "math/cbrt.h"
 #include "math/cbrtbf16.h"
@@ -305,23 +305,23 @@
 #include "math/iscanonicalbf16.h"
 #include "math/iscanonicalf.h"
 #include "math/iscanonicalf128.h"
-#include "math/iscanonicalf80.h"
 #include "math/iscanonicalf16.h"
+#include "math/iscanonicalf80.h"
 #include "math/iscanonicall.h"
 // TODO: isnan is a macro in <math.h>
 // #include "math/isnan.h"
 #include "math/isnanf.h"
 #include "math/isnanf128.h"
-#include "math/isnanf80.h"
 #include "math/isnanf16.h"
+#include "math/isnanf80.h"
 #include "math/isnanl.h"
 // TODO: issignaling is a macro in <math.h>
 // #include "math/issignaling.h"
 #include "math/issignalingbf16.h"
 #include "math/issignalingf.h"
 #include "math/issignalingf128.h"
-#include "math/issignalingf80.h"
 #include "math/issignalingf16.h"
+#include "math/issignalingf80.h"
 #include "math/issignalingl.h"
 #include "math/ldexp.h"
 #include "math/ldexpbf16.h"
@@ -509,15 +509,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/math/generic/canonicalizef80.cpp b/libc/src/math/generic/canonicalizef80.cpp
index f6ae1c73c..6e3ea4708 100644
--- a/libc/src/math/generic/canonicalizef80.cpp
+++ b/libc/src/math/generic/canonicalizef80.cpp
@@ -19,7 +19,7 @@ namespace LIBC_NAMESPACE_DECL {
 
 using LIBC_NAMESPACE::fputil::Float80;
 
-LLVM_LIBC_FUNCTION(int, canonicalizef80, (float80 *cx, const float80 *x)) {
+LLVM_LIBC_FUNCTION(int, canonicalizef80, (float80 * cx, const float80 *x)) {
   Float80 cx_f80 = cpp::bit_cast<Float80>(*cx);
   Float80 x_f80 = cpp::bit_cast<Float80>(*x);
   int res = math::canonicalizef80(&cx_f80, &x_f80);

``````````

</details>


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


More information about the llvm-branch-commits mailing list