diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp --- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp @@ -579,8 +579,6 @@ /*MaskAgnostic*/ true); SDValue VTypeIOp = CurDAG->getTargetConstant(VTypeI, DL, XLenVT); - SmallVector 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 Ops = {VLImm, VTypeIOp}; - ReplaceNode( - Node, CurDAG->getMachineNode(RISCV::PseudoVSETIVLI, DL, VTs, Ops)); + ReplaceNode(Node, CurDAG->getMachineNode(RISCV::PseudoVSETIVLI, DL, + XLenVT, VLImm, VTypeIOp)); return; } } } - SmallVector 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) {