[libc-commits] [libc] [llvm] [libc][math] Refactor bf16fma to Header Only (PR #182572)
via libc-commits
libc-commits at lists.llvm.org
Sun Mar 15 12:07:59 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,cpp -- libc/shared/math/bf16fma.h libc/src/__support/math/bf16fma.h libc/shared/math.h libc/src/math/generic/bf16fma.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/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index ddfce541d..ffcb667f7 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -437,9 +437,8 @@ TEST(LlvmLibcSharedMathTest, AllBFloat16) {
EXPECT_FP_EQ(bfloat16(0.0),
LIBC_NAMESPACE::shared::fmaxbf16(bfloat16(0.0), bfloat16(0.0)));
- EXPECT_FP_EQ(bfloat16(10.0),
- LIBC_NAMESPACE::shared::bf16fma(2.0, 3.0, 4.0));
-
+ EXPECT_FP_EQ(bfloat16(10.0), LIBC_NAMESPACE::shared::bf16fma(2.0, 3.0, 4.0));
+
bfloat16 getpayloadbf16_x = bfloat16(0.0);
EXPECT_FP_EQ(bfloat16(-1.0),
LIBC_NAMESPACE::shared::getpayloadbf16(&getpayloadbf16_x));
``````````
</details>
https://github.com/llvm/llvm-project/pull/182572
More information about the libc-commits
mailing list