[VENTUS][RISCV][Fix] Add PseudoBR when converge return bb in InsertJoinToVBranch pass.
This commit is contained in:
parent
fe3244b577
commit
41564530d5
|
@ -191,6 +191,8 @@ bool VentusInsertJoinToVBranch::convergeReturnBlock(MachineFunction &MF) {
|
|||
auto &RetMI = RetBB->back();
|
||||
assert(RetMI.getOpcode() == RISCV::PseudoRET && "Unexpected opcode");
|
||||
RetMI.eraseFromParent();
|
||||
if (RetBB->getFallThrough() != NewRetBB)
|
||||
BuildMI(RetBB, DebugLoc(), TII->get(RISCV::PseudoBR)).addMBB(NewRetBB);
|
||||
RetBB->addSuccessor(NewRetBB);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue