[PATCH] D147939: ValueTracking: Handle fptrunc in computeKnownFPClass
Kevin P. Neal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 06:38:54 PDT 2023
kpn added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4627
+ if (KnownSrc.isKnownNeverNaN())
+ Known.knownNot(fcNan);
+ break;
----------------
arsenm wrote:
> kpn wrote:
> > Isn't infinity an issue as well? If the input to be truncated is zero then we know the result can't be infinity. Then again, if the goal is to keep parity with the old implementation then do we need to worry about infinity yet?
> fptrunc(inf) => inf so there isn't really an issue as much of a missing optimization
Wait, it's possible for a non-infinity value to be truncated to a value that is infinity in the smaller format, no? Shouldn't we just be checking that the value is in range, or just checking for zero if that's too much work?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147939/new/
https://reviews.llvm.org/D147939
More information about the llvm-commits
mailing list