Skip to content

Commit 3204f3e

Browse files
committed
[RISCV] Convert VTYPE operand check to assert in RISCVInsertVSETVLI. NFC
The VTYPE operands of a vsetvli pseudo are always immediates
1 parent f40f4fc commit 3204f3e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,9 +1522,7 @@ static bool canMutatePriorConfig(const MachineInstr &PrevMI,
15221522
}
15231523
}
15241524

1525-
if (!PrevMI.getOperand(2).isImm() || !MI.getOperand(2).isImm())
1526-
return false;
1527-
1525+
assert(PrevMI.getOperand(2).isImm() && MI.getOperand(2).isImm());
15281526
auto PriorVType = PrevMI.getOperand(2).getImm();
15291527
auto VType = MI.getOperand(2).getImm();
15301528
return areCompatibleVTYPEs(PriorVType, VType, Used);

0 commit comments

Comments
 (0)