Skip to content

Commit d4f7741

Browse files
fixup! VL operand is never x0
1 parent b5c8efe commit d4f7741

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
@@ -930,8 +930,7 @@ bool RISCVVLOptimizer::checkUsers(const MachineOperand *&CommonVL,
930930
const MCInstrDesc &Desc = UserMI.getDesc();
931931
unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
932932
const MachineOperand &VLOp = UserMI.getOperand(VLOpNum);
933-
if ((VLOp.isReg() && VLOp.getReg() != RISCV::X0) ||
934-
(VLOp.isImm() && VLOp.getImm() != 0)) {
933+
if (VLOp.isReg() || (VLOp.isImm() && VLOp.getImm() != 0)) {
935934
if (!CommonVL) {
936935
CommonVL = &VLOp;
937936
continue;

0 commit comments

Comments
 (0)