[llvm] [ValueTraking] Improve KnownFPClass for fadd. Handle infinity signs and strict sign cases (PR #190559)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 5 16:29:35 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/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 9a0644774..67d62328c 100644
--- a/llvm/lib/Support/KnownFPClass.cpp
+++ b/llvm/lib/Support/KnownFPClass.cpp
@@ -323,7 +323,6 @@ static KnownFPClass fadd_impl(const KnownFPClass &KnownLHS,
         KnownRHS.cannotBeOrderedLessEqZero(Mode))
       Known.knownNot(fcZero);
 
-
     // This can't underflow if one of the operands is known normal.
     if (KnownLHS.isKnownNever(fcZero | fcNegSubnormal) ||
         KnownRHS.isKnownNever(fcZero | fcNegSubnormal))

``````````

</details>


https://github.com/llvm/llvm-project/pull/190559


More information about the llvm-commits mailing list