[VENTUS][RISCV][fix] Avoid MBB label lost after optimization

This commit is contained in:
zhoujing 2023-07-13 13:26:13 +08:00
parent 209306abc9
commit a9d1e6f524
1 changed files with 2 additions and 0 deletions

View File

@ -106,6 +106,8 @@ bool VentusInsertJoinToVBranch::runOnMachineFunction(MachineFunction &MF) {
auto *PostIDomBB = MPDT->getNode(&MBB)->getIDom()->getBlock();
assert(PostIDomBB);
PostIDomBB->setLabelMustBeEmitted();
MCSymbol *AUIPCSymbol = MF.getContext().createNamedTempSymbol("pcrel_hi");
MachineInstr *MIAUIPC = BuildMI(MBB, VBranch->getIterator(), DebugLoc(),
TII->get(RISCV::AUIPC), RISCV::X6)