[llvm] 8846cd3 - [RISCV][NFC] Simplify code.
Jianjian GUAN via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 02:02:15 PDT 2023
Author: Jianjian GUAN
Date: 2023-06-16T17:02:05+08:00
New Revision: 8846cd3a3096069e04565f83ed374cf889ae17df
URL: https://github.com/llvm/llvm-project/commit/8846cd3a3096069e04565f83ed374cf889ae17df
DIFF: https://github.com/llvm/llvm-project/commit/8846cd3a3096069e04565f83ed374cf889ae17df.diff
LOG: [RISCV][NFC] Simplify code.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D153095
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 2a001a6e78c69..ea7cc1ca1e8b5 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -579,8 +579,6 @@ void RISCVDAGToDAGISel::selectVSETVLI(SDNode *Node) {
/*MaskAgnostic*/ true);
SDValue VTypeIOp = CurDAG->getTargetConstant(VTypeI, DL, XLenVT);
- SmallVector<EVT, 2> VTs = {XLenVT};
-
SDValue VLOperand;
unsigned Opcode = RISCV::PseudoVSETVLI;
if (VLMax) {
@@ -593,17 +591,15 @@ void RISCVDAGToDAGISel::selectVSETVLI(SDNode *Node) {
uint64_t AVL = C->getZExtValue();
if (isUInt<5>(AVL)) {
SDValue VLImm = CurDAG->getTargetConstant(AVL, DL, XLenVT);
- SmallVector<SDValue, 3> Ops = {VLImm, VTypeIOp};
- ReplaceNode(
- Node, CurDAG->getMachineNode(RISCV::PseudoVSETIVLI, DL, VTs, Ops));
+ ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETIVLI, DL,
+ XLenVT, VLImm, VTypeIOp));
return;
}
}
}
- SmallVector<SDValue, 3> Ops = {VLOperand, VTypeIOp};
-
- ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, VTs, Ops));
+ ReplaceNode(Node,
+ CurDAG->getMachineNode(Opcode, DL, XLenVT, VLOperand, VTypeIOp));
}
bool RISCVDAGToDAGISel::tryShrinkShlLogicImm(SDNode *Node) {
More information about the llvm-commits
mailing list