[llvm] 8801e60 - [RISCV][NFC] Remove ISel of SPLAT_VECTOR
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 22:37:48 PDT 2022
Author: wangpc
Date: 2022-10-27T13:36:25+08:00
New Revision: 8801e60c11ff9aacb9bc9d8eb69c9f2a3fb9bdf2
URL: https://github.com/llvm/llvm-project/commit/8801e60c11ff9aacb9bc9d8eb69c9f2a3fb9bdf2
DIFF: https://github.com/llvm/llvm-project/commit/8801e60c11ff9aacb9bc9d8eb69c9f2a3fb9bdf2.diff
LOG: [RISCV][NFC] Remove ISel of SPLAT_VECTOR
Since we have converted SPLAT_VECTOR to VMV_V_X_VL
or VFMV_V_F_VL in RISCVDAGToDAGISel::PreprocessISelDAG().
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D136814
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index 0c422d1f99497..7cd52b5edd208 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -1786,7 +1786,6 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
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 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
// 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 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
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)))
More information about the llvm-commits
mailing list