[PATCH] D128159: [DAG] Enable scalable vectors handling in computeKnownBits

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 09:42:54 PDT 2022


dmgreen added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2912
   KnownBits Known(BitWidth);   // Don't know anything.
 
   if (auto *C = dyn_cast<ConstantSDNode>(Op)) {
----------------
RKSimon wrote:
> should we assert here?
> ```
> assert((!Op.getValueType().isScalableVector() || DemandedElts.isAllOnes()) && "All scalable vector elements must be demanded");
> ```
I was keeping the assert with the existing one for the length of DemandedElts. I can move it or both of them if you think that's best. (But I don't think that ConstantSDNode/ConstantFPSDNode can be scalable, and the MaxRecursionDepth didn't seem important for whether we assert or not). Let me know what you think. Happy to move it.


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

https://reviews.llvm.org/D128159



More information about the llvm-commits mailing list