[PATCH] D148186: ValueTracking: Handle insertelement in computeKnownFPClass
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 17 10:07:46 PDT 2023
arsenm marked an inline comment as done.
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4128
const TargetLibraryInfo *TLI) {
+ assert(Known.isUnknown() && "should not be called with known information");
+
----------------
foad wrote:
> Wouldn't it be simpler to make all these computeKnownFPClass functions return KnownFPClass?
Yes. I started by copying the raw signature for computeKnownBits. Probably should do a cleanup and replace the arguments at some point. The ordering doesn't make much sense (e.g. Depth before the others seems like a shortcut taken years ago). Plus TLI not being part of Query also doesn't make much sense
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4606-4607
auto *FVTy = dyn_cast<FixedVectorType>(V->getType());
APInt DemandedElts =
FVTy ? APInt::getAllOnes(FVTy->getNumElements()) : APInt(1, 1);
::computeKnownFPClass(V, DemandedElts, InterestedClasses, Known, Depth,
----------------
foad wrote:
> Could call your new computeKnownFPClass overload rather than repeating this logic?
Yes, I think so
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148186/new/
https://reviews.llvm.org/D148186
More information about the llvm-commits
mailing list