[PATCH] D105871: Followup to D99355: implementation of sdag support for vp load/store/gather/scatter.

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 19 05:41:22 PDT 2021


simoll added a comment.

The `visitVectorPredicationIntrinsic` is pretty crammed now. Probably a good idea to extract the SDNode buildling for load/store/scatter/gather into their own functions as done for regular (masked) load/store/gather/scatter.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7395-7416
+      unsigned AS =
+          PtrOperand->getType()->getScalarType()->getPointerAddressSpace();
+      MachineMemOperand *MMO = DAG.getMachineFunction().getMachineMemOperand(
+          MachinePointerInfo(AS), MachineMemOperand::MOLoad,
+          MemoryLocation::UnknownSize, *Alignment, AAInfo, Ranges);
+      SDValue Base, Index, Scale;
+      ISD::MemIndexType IndexType;
----------------
This is the same code as ..


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7443-7464
+      unsigned AS =
+          PtrOperand->getType()->getScalarType()->getPointerAddressSpace();
+      MachineMemOperand *MMO = DAG.getMachineFunction().getMachineMemOperand(
+          MachinePointerInfo(AS), MachineMemOperand::MOStore,
+          MemoryLocation::UnknownSize, *Alignment, AAInfo);
+      SDValue Base, Index, Scale;
+      ISD::MemIndexType IndexType;
----------------
.. this code. Can we de-duplicate and move this into its own function?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105871



More information about the llvm-commits mailing list