[llvm] [DAG] computeKnownFPClass - add ISD::SINT_TO_FP/UINT_TO_FP handling (PR #190539)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 20:25:43 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 cpp,h -- llvm/include/llvm/Support/KnownFPClass.h llvm/lib/Analysis/ValueTracking.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/Support/KnownFPClass.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/llvm/lib/Support/KnownFPClass.cpp b/llvm/lib/Support/KnownFPClass.cpp
index 11ce35d2f..e519a443f 100644
--- a/llvm/lib/Support/KnownFPClass.cpp
+++ b/llvm/lib/Support/KnownFPClass.cpp
@@ -290,14 +290,14 @@ KnownFPClass KnownFPClass::bitcast(const fltSemantics &FltSemantics,
static KnownFPClass itofp_impl(const KnownBits &KnownSrc,
const fltSemantics &FltSem, bool IsSigned) {
KnownFPClass Known;
-
+
Known.knownNot(fcNan);
Known.knownNot(fcSubnormal);
Known.knownNot(fcNegZero);
-
+
if (!IsSigned)
- Known.signBitMustBeZero();
-
+ Known.signBitMustBeZero();
+
if (KnownSrc.isNonZero())
Known.knownNot(fcZero);
``````````
</details>
https://github.com/llvm/llvm-project/pull/190539
More information about the llvm-commits
mailing list