Skip to content

Commit 64e9a3f

Browse files
committed
[RISCV] Use isVLPreservingConfig in isConvertibleToVMV_V_V. NFC
1 parent f71e4e9 commit 64e9a3f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,7 @@ static bool isConvertibleToVMV_V_V(const RISCVSubtarget &STI,
293293
}
294294
// Only permit `vsetvli x0, x0, vtype` between COPY and the source
295295
// define instruction.
296-
if (MBBI->getOperand(0).getReg() != RISCV::X0)
297-
return false;
298-
if (MBBI->getOperand(1).isImm())
299-
return false;
300-
if (MBBI->getOperand(1).getReg() != RISCV::X0)
296+
if (!RISCVInstrInfo::isVLPreservingConfig(*MBBI))
301297
return false;
302298
continue;
303299
}

0 commit comments

Comments
 (0)