[PATCH] D110253: [SelectionDAG] Make WidenVecRes_EXTRACT_SUBVECTOR work for scalable vectors.

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 04:07:12 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:4108
+            DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, PartVT, InOp,
+                        DAG.getVectorIdxConstant(IdxVal + I * GCD, dl)));
+      for (; I < WidenNumElts / GCD; ++I)
----------------
Hi @sdesmalen, I think we're assuming here that IdxVal is always going to be a multiple of GCD, which may be true. However, I wonder if it's worth adding an assert for this to ensure we're always following the lang ref for EXTRACT_SUBVECTOR.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110253



More information about the llvm-commits mailing list