Skip to content

Commit c67245c

Browse files
fixup! VL operand is never x0
1 parent 6aa3d72 commit c67245c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,7 @@ bool RISCVVLOptimizer::checkUsers(const MachineOperand *&CommonVL,
972972
const MCInstrDesc &Desc = UserMI.getDesc();
973973
unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
974974
const MachineOperand &VLOp = UserMI.getOperand(VLOpNum);
975-
if ((VLOp.isReg() && VLOp.getReg() != RISCV::X0) ||
976-
(VLOp.isImm() && VLOp.getImm() != 0)) {
975+
if (VLOp.isReg() || (VLOp.isImm() && VLOp.getImm() != 0)) {
977976
if (!CommonVL) {
978977
CommonVL = &VLOp;
979978
continue;

0 commit comments

Comments
 (0)