[llvm] [Support][ValueTraking] Improve KnownFPClass for fadd. Handle infinity signs (PR #190559)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 05:41:26 PDT 2026
================
@@ -292,10 +292,11 @@ static KnownFPClass fadd_impl(const KnownFPClass &KnownLHS,
const KnownFPClass &KnownRHS, DenormalMode Mode) {
KnownFPClass Known;
- // Adding positive and negative infinity produces NaN.
- // TODO: Check sign of infinities.
+ // Adding positive and negative infinity produces NaN, but only if both
+ // opposite-sign infinity combinations are possible.
----------------
arsenm wrote:
Can you cover these in test/Transforms/Attributor/nofpclass? It's easier to read out the exact computed result rather than trying to figure out the relevant subset in a triggered transform
https://github.com/llvm/llvm-project/pull/190559
More information about the llvm-commits
mailing list