[PATCH] D108987: [RISCV][VP] Custom lower VP_SCATTER and VP_GATHER
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 1 23:43:14 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4725
+ if (IsVP) {
+ auto *MGN = cast<VPGatherSDNode>(Op.getNode());
+ MemVT = MGN->getMemoryVT();
----------------
Couldn't this have been a dyn_cast and avoid the IsVP parameter?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4827
+
+ if (IsVP) {
+ auto *MSN = cast<VPScatterSDNode>(Op.getNode());
----------------
Same here.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:6454
ISD::MemIndexType NewIndexTy = ISD::UNSIGNED_UNSCALED;
+ if (IsVP) {
+ if (const auto *VPGN = dyn_cast<VPGatherSDNode>(N)) {
----------------
Could we just dyn_cast<VPScatterSDNode> and avoiding needing IsVP?
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