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) { @@ -594,8 +592,8 @@ 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, Ops)); return; } } @@ -603,7 +601,7 @@ SmallVector Ops = {VLOperand, VTypeIOp}; - ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, VTs, Ops)); + ReplaceNode(Node, CurDAG->getMachineNode(Opcode, DL, XLenVT, Ops)); } bool RISCVDAGToDAGISel::tryShrinkShlLogicImm(SDNode *Node) {