llvm-project
ce60a035 - [BranchRelaxation] Fix invalid branch generation in branch-relaxation (#162065)

Commit
137 days ago
[BranchRelaxation] Fix invalid branch generation in branch-relaxation (#162065) If we have MBB with only one successor which is accessable through both conditional and unconditional branches (TBB == FBB), in `fixupConditionalBranch` we will first replace FBB with NewMBB in successors list - `MBB->replaceSuccessor(FBB, NewBB);`, and then create branch to TBB - `insertBranch(MBB, &NextBB, TBB, Cond);`, ending up with two branches to different blocks, but only one successor. Fixes: https://github.com/llvm/llvm-project/issues/162063
Author
Parents
Loading