[PATCH] D99923: [RISCV] Add helper function to share some of the code for isel of vector load/store intrinsics.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 00:53:07 PDT 2021


frasercrmck accepted this revision.
frasercrmck added a comment.

LGTM other than that nit.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp:212
 
-void RISCVDAGToDAGISel::selectVLXSEG(SDNode *Node, bool IsMasked,
-                                     bool IsOrdered) {
-  SDLoc DL(Node);
-  unsigned NF = Node->getNumValues() - 1;
-  MVT VT = Node->getSimpleValueType(0);
-  unsigned ScalarSize = VT.getScalarSizeInBits();
-  MVT XLenVT = Subtarget->getXLenVT();
-  RISCVVLMUL LMUL = RISCVTargetLowering::getLMUL(VT);
-  SDValue SEW = CurDAG->getTargetConstant(ScalarSize, DL, XLenVT);
-
+void RISCVDAGToDAGISel::addVectorLoadStoreOperands(
+    SDNode *Node, unsigned SEWImm, const SDLoc &DL, unsigned CurOp,
----------------
nit: having this function placed after its "load" uses but before its "store" uses is a little odd, and I think it's making the diff a little harder to read.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99923



More information about the llvm-commits mailing list