[VENTUS][RISCV][fix] Fix the undefined physical register bug

Fix the undefined physical register bug when inserting VMV_V_X instruction
in "checkJoinMBB" funtion to compile with "--verify-machineinstr" parameter.
This commit is contained in:
qinfan 2023-09-28 10:24:45 +08:00
parent 6630f81570
commit e6937f5ead
1 changed files with 1 additions and 0 deletions

View File

@ -269,6 +269,7 @@ bool VentusInsertJoinToVBranch::checkJoinMBB(MachineBasicBlock &MBB) const {
}
if (NeedToBeErased) {
IsChanged |= true;
MBB.addLiveIn(MCRegister(MI.getOperand(0).getReg()));
MI.eraseFromParent();
}
}