[PATCH] D98495: [CodeGen] Fix issues with scalable-vector INSERT/EXTRACT_SUBVECTORs

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 05:28:32 PST 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1281
+  unsigned SubElems = SubVecVT.getVectorMinNumElements();
+  unsigned LoElems = LoVT.getVectorMinNumElements();
   unsigned IdxVal = cast<ConstantSDNode>(Idx)->getZExtValue();
----------------
Move these back to the old location?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1291
+  if (VecVT.isScalableVector() == SubVecVT.isScalableVector()) {
+    unsigned VecElems = VecVT.getVectorMinNumElements();
+    if (IdxVal >= LoElems && IdxVal + SubElems <= VecElems) {
----------------
Move this back to the old location?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98495



More information about the llvm-commits mailing list