mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Update dom tree. Fix PR 2372.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -569,7 +569,6 @@ void LoopUnswitch::EmitPreheaderBranchOnCondition(Value *LIC, Constant *Val,
|
||||
|
||||
// Insert the new branch.
|
||||
BranchInst::Create(TrueDest, FalseDest, BranchVal, InsertPt);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -607,6 +606,10 @@ void LoopUnswitch::UnswitchTrivialCondition(Loop *L, Value *Cond,
|
||||
// insert the new conditional branch.
|
||||
EmitPreheaderBranchOnCondition(Cond, Val, NewExit, NewPH,
|
||||
OrigPH->getTerminator());
|
||||
if (DT) {
|
||||
DT->changeImmediateDominator(NewExit, OrigPH);
|
||||
DT->changeImmediateDominator(NewPH, OrigPH);
|
||||
}
|
||||
LPM->deleteSimpleAnalysisValue(OrigPH->getTerminator(), L);
|
||||
OrigPH->getTerminator()->eraseFromParent();
|
||||
|
||||
|
Reference in New Issue
Block a user