[PATCH] D136814: [RISCV][NFC] Remove ISel of SPLAT_VECTOR
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 21:42:12 PDT 2022
pcwang-thead created this revision.
pcwang-thead added reviewers: asb, craig.topper, reames.
Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.
Since we have converted SPLAT_VECTOR to VMV_V_X_VL
or VFMV_V_F_VL in RISCVDAGToDAGISel::PreprocessISelDAG().
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D136814
Files:
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Index: llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -1786,7 +1786,6 @@
ReplaceNode(Node, Extract.getNode());
return;
}
- case ISD::SPLAT_VECTOR:
case RISCVISD::VMV_S_X_VL:
case RISCVISD::VFMV_S_F_VL:
case RISCVISD::VMV_V_X_VL:
@@ -1794,10 +1793,9 @@
// Try to match splat of a scalar load to a strided load with stride of x0.
bool IsScalarMove = Node->getOpcode() == RISCVISD::VMV_S_X_VL ||
Node->getOpcode() == RISCVISD::VFMV_S_F_VL;
- bool HasPassthruOperand = Node->getOpcode() != ISD::SPLAT_VECTOR;
- if (HasPassthruOperand && !Node->getOperand(0).isUndef())
+ if (!Node->getOperand(0).isUndef())
break;
- SDValue Src = HasPassthruOperand ? Node->getOperand(1) : Node->getOperand(0);
+ SDValue Src = Node->getOperand(1);
auto *Ld = dyn_cast<LoadSDNode>(Src);
if (!Ld)
break;
@@ -1810,9 +1808,7 @@
break;
SDValue VL;
- if (Node->getOpcode() == ISD::SPLAT_VECTOR)
- VL = CurDAG->getTargetConstant(RISCV::VLMaxSentinel, DL, XLenVT);
- else if (IsScalarMove) {
+ if (IsScalarMove) {
// We could deal with more VL if we update the VSETVLI insert pass to
// avoid introducing more VSETVLI.
if (!isOneConstant(Node->getOperand(2)))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136814.471018.patch
Type: text/x-patch
Size: 1441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221027/561af478/attachment.bin>
More information about the llvm-commits
mailing list