[PATCH] D153095: [RISCV][NFC] Simplify code.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 23:56:10 PDT 2023
jacquesguan updated this revision to Diff 532002.
jacquesguan added a comment.
Address comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153095/new/
https://reviews.llvm.org/D153095
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
@@ -579,8 +579,6 @@
/*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 @@
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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153095.532002.patch
Type: text/x-patch
Size: 1308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230616/2746ce8c/attachment.bin>
More information about the llvm-commits
mailing list