Skip to content

Commit 9ae6a4d

Browse files
committed
Address reviewer's comments
1 parent 9af8047 commit 9ae6a4d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,8 @@ bool RISCVInstrInfo::hasReassociableVectorSibling(const MachineInstr &Inst,
17851785
bool &Commuted) const {
17861786
const MachineBasicBlock *MBB = Inst.getParent();
17871787
const MachineRegisterInfo &MRI = MBB->getParent()->getRegInfo();
1788+
assert(RISCVII::isFirstDefTiedToFirstUse(get(Inst.getOpcode())) &&
1789+
"Expect the present of passthrough operand.");
17881790
MachineInstr *MI1 = MRI.getUniqueVRegDef(Inst.getOperand(2).getReg());
17891791
MachineInstr *MI2 = MRI.getUniqueVRegDef(Inst.getOperand(3).getReg());
17901792

0 commit comments

Comments
 (0)