[llvm] [DAG] computeKnownFPClass - add ISD::SINT_TO_FP/UINT_TO_FP handling (PR #190539)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 03:40:29 PDT 2026
================
@@ -287,6 +287,50 @@ KnownFPClass KnownFPClass::bitcast(const fltSemantics &FltSemantics,
return Known;
}
+static KnownFPClass itofp_impl(const KnownBits &KnownSrc,
+ const fltSemantics &FltSem, bool IsSigned) {
+ KnownFPClass Known;
+ // If the integer is non-zero, the result cannot be +0.0
+ if (KnownSrc.isNonZero())
+ Known.knownNot(fcPosZero);
----------------
RKSimon wrote:
Neither +/-0.0 surely? I realise its typically caught in the earlier fast path code - but no reason to be over specific?
```suggestion
Known.knownNot(fcZero);
```
https://github.com/llvm/llvm-project/pull/190539
More information about the llvm-commits
mailing list