[libc-commits] [libc] [libc][math][c23] Implement canonicalize functions (PR #85940)
via libc-commits
libc-commits at lists.llvm.org
Thu Mar 21 07:33:57 PDT 2024
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 c48d8182f172ac24244d5fb038b7ab983f67def4 402eb1587ebb31f3ae80544248c7f9b86dd1af63 -- libc/src/math/canonicalize.h libc/src/math/canonicalizef.h libc/src/math/canonicalizef128.h libc/src/math/canonicalizel.h libc/src/math/generic/canonicalize.cpp libc/src/math/generic/canonicalizef.cpp libc/src/math/generic/canonicalizef128.cpp libc/src/math/generic/canonicalizel.cpp libc/test/src/math/smoke/canonicalizeTest.h libc/src/__support/FPUtil/BasicOperations.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/FPUtil/BasicOperations.h b/libc/src/__support/FPUtil/BasicOperations.h
index f0f551c2ed..3a3dcc6b75 100644
--- a/libc/src/__support/FPUtil/BasicOperations.h
+++ b/libc/src/__support/FPUtil/BasicOperations.h
@@ -75,7 +75,8 @@ LIBC_INLINE T fdim(T x, T y) {
template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
LIBC_INLINE T canonicalize(T *cx, const T *x) {
- if constexpr (get_fp_type<T>() == FPType::X86_Binary80) {}
+ if constexpr (get_fp_type<T>() == FPType::X86_Binary80) {
+ }
FPBits<T> sx(*x);
if (sx.is_signaling_nan()) {
*cx = FPBits<T>::quiet_nan();
``````````
</details>
https://github.com/llvm/llvm-project/pull/85940
More information about the libc-commits
mailing list