[PATCH] D148544: ValueTracking: Handle fptrunc_round in computeKnownFPClass
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 04:53:11 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4078
+ KnownFPClass KnownSrc;
+ computeKnownFPClass(Op->getOperand(0), DemandedElts, InterestedClasses,
+ KnownSrc, Depth + 1, Q, TLI);
----------------
foad wrote:
> I think there might be subtle bugs lurking in the way you pass InterestedClasses into recursive calls. E.g if InterestedClasses was fcQNan here, and the recursive call returned fcNone, you would conclude the operand is not nan - but in reality it could still be snan.
>
> If I'm right that that's a bug then you could fix this case by passing fcNan into the recursive call.
>
> Anyway this is pre-existing.
InterestedClasses shouldn't be an issue, it's only used for early exiting as it's a compile time hint. The nan propagation could be better, I started introducing a helper for this in D148599
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148544/new/
https://reviews.llvm.org/D148544
More information about the llvm-commits
mailing list