[PATCH] D108987: [RISCV][VP] Custom lower VP_SCATTER and VP_GATHER
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 3 09:59:17 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4726
+ if (auto *VPGN = dyn_cast<VPGatherSDNode>(Op.getNode())) {
+ MemVT = VPGN->getMemoryVT();
+ MMO = VPGN->getMemOperand();
----------------
Can we share MemVT, MMO, Chain, and BasePtr initializing by using the MemSDNode base?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4739
+ auto *MGN = cast<MaskedGatherSDNode>(Op.getNode());
+ // Else it must be a MGATHER.
+ MemVT = MGN->getMemoryVT();
----------------
Should this comment be above the cast?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4829
+ if (auto *VPSN = dyn_cast<VPScatterSDNode>(Op.getNode())) {
+ MMO = VPSN->getMemOperand();
+ MemVT = VPSN->getMemoryVT();
----------------
Same question about MemSDNode
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:6412
+ if (N->getOpcode() == ISD::VP_GATHER || N->getOpcode() == ISD::VP_SCATTER) {
+ const auto *VPGSN = cast<VPGatherScatterSDNode>(N);
+ Index = VPGSN->getIndex();
----------------
dyn_cast in the above if?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108987/new/
https://reviews.llvm.org/D108987
More information about the llvm-commits
mailing list