[libc-commits] [libc] [libc][math] Fixed Hypotbf16 build failure. (PR #186415)
via libc-commits
libc-commits at lists.llvm.org
Fri Mar 13 08:46:04 PDT 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 h -- libc/src/__support/FPUtil/Hypot.h --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/src/__support/FPUtil/Hypot.h b/libc/src/__support/FPUtil/Hypot.h
index e0d295471..292140065 100644
--- a/libc/src/__support/FPUtil/Hypot.h
+++ b/libc/src/__support/FPUtil/Hypot.h
@@ -218,7 +218,8 @@ LIBC_INLINE T hypot(T x, T y) {
for (StorageType current_bit = leading_one >> 1; current_bit;
current_bit >>= 1) {
- r = static_cast<StorageType>((r << 1) + ((tail_bits & current_bit) ? 1 : 0));
+ r = static_cast<StorageType>((r << 1) +
+ ((tail_bits & current_bit) ? 1 : 0));
StorageType tmp = static_cast<StorageType>((y_new << 1)) +
current_bit; // 2*y_new(n - 1) + 2^(-n)
if (r >= tmp) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/186415
More information about the libc-commits
mailing list