[clang] [llvm] [APFloat] Add support for f8E3M4 IEEE 754 type (PR #99698)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 19 13:22:00 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 a8b90c835291df9a6c152fd32de666192aa0da77 fdcc285cf016d2dfd7883ad6fd100d676ff9ff52 --extensions h,cpp -- clang/lib/AST/MicrosoftMangle.cpp llvm/include/llvm/ADT/APFloat.h llvm/lib/Support/APFloat.cpp llvm/unittests/ADT/APFloatTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/ADT/APFloatTest.cpp b/llvm/unittests/ADT/APFloatTest.cpp
index 8a9488165b..be675bb7fe 100644
--- a/llvm/unittests/ADT/APFloatTest.cpp
+++ b/llvm/unittests/ADT/APFloatTest.cpp
@@ -6661,7 +6661,8 @@ TEST(APFloatTest, Float8E3M4ToDouble) {
APFloat::getSmallestNormalized(APFloat::Float8E3M4(), true);
EXPECT_EQ(-0x1.p-2, NegSmallest.convertToDouble());
- APFloat PosSmallestDenorm = APFloat::getSmallest(APFloat::Float8E3M4(), false);
+ APFloat PosSmallestDenorm =
+ APFloat::getSmallest(APFloat::Float8E3M4(), false);
EXPECT_TRUE(PosSmallestDenorm.isDenormal());
EXPECT_EQ(0x1.p-6, PosSmallestDenorm.convertToDouble());
APFloat NegSmallestDenorm = APFloat::getSmallest(APFloat::Float8E3M4(), true);
@@ -7008,7 +7009,8 @@ TEST(APFloatTest, Float8E3M4ToFloat) {
APFloat::getSmallestNormalized(APFloat::Float8E3M4(), true);
EXPECT_EQ(-0x1.p-2, NegSmallest.convertToFloat());
- APFloat PosSmallestDenorm = APFloat::getSmallest(APFloat::Float8E3M4(), false);
+ APFloat PosSmallestDenorm =
+ APFloat::getSmallest(APFloat::Float8E3M4(), false);
EXPECT_TRUE(PosSmallestDenorm.isDenormal());
EXPECT_EQ(0x1.p-6, PosSmallestDenorm.convertToFloat());
APFloat NegSmallestDenorm = APFloat::getSmallest(APFloat::Float8E3M4(), true);
``````````
</details>
https://github.com/llvm/llvm-project/pull/99698
More information about the cfe-commits
mailing list