[PATCH] D136470: Allow scalable vectors in computeKnownBits

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 11:47:20 PDT 2022


efriedma added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1840
     // Early out if the index is non-constant or out-of-range.
     unsigned NumElts = DemandedElts.getBitWidth();
     if (!CIdx || CIdx->getValue().uge(NumElts)) {
----------------
I guess this is a more general thing, but does it make sense to analyze insertelement even if we can't figure out which element is being inserted?


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1874
     auto *CIdx = dyn_cast<ConstantInt>(Idx);
     if (isa<ScalableVectorType>(Vec->getType())) {
       // FIXME: there's probably *something* we can do with scalable vectors
----------------
Duplicate ScalableVectorType check?

Does it make sense to analyze the vector operand without trying to figure out which elt is demanded?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136470/new/

https://reviews.llvm.org/D136470



More information about the llvm-commits mailing list