[PATCH] D83950: [CodeGen] In narrowExtractedVectorLoad bail out for scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 23:01:24 PDT 2020


david-arm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19315
   unsigned Index = ExtIdx->getZExtValue();
-  unsigned NumElts = VT.getVectorNumElements();
+  unsigned NumElts = VT.getVectorMinNumElements();
 
----------------
sdesmalen wrote:
> Can you make this ElementCount, to make it clear that it can be scalable?
Hi Sander, I thought about this and I'm not sure if this is quite the right approach either at the moment. I totally agree that it's good to make more use ElementCount objects directly, but I'd also like to avoid referring to ElementCount.Min everywhere as I personally don't think it's sensible to have public member variables in ElementCount. One reason for using getVectorMinNumElements() here is to avoid that ugliness, at least for now. What do you think? If you still want me to use EC.Min here instead of NumElts then that's fine, and regardless I think it's worth creating a follow-on patch that makes ElementCount members private.


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

https://reviews.llvm.org/D83950



More information about the llvm-commits mailing list