[PATCH] D86548: [SVE][CodeGen] Legalisation of truncate for scalable vectors

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 09:52:20 PDT 2020


david-arm added a comment.

Looks good to me, but I'll defer the final LGTM to @paulwalker-arm and @efriedma! I learned something new from this patch too - didn't know you could add target ISD combines like that.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:4692
+      SDValue Op = N->getOperand(OpIdx);
+      unsigned Idx = Op.getValueType().getVectorMinNumElements();
+      ResVec = DAG.getNode(ISD::INSERT_SUBVECTOR, dl, ResVT, ResVec, Op,
----------------
nit: Perhaps better to rename Idx to something like NumSubVecElems or something like that, since it's not really an index now?


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

https://reviews.llvm.org/D86548



More information about the llvm-commits mailing list