mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Don't generate branch to entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36917 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
356e72c4f1
commit
6603a1bff0
@ -280,7 +280,9 @@ static void SplitEdgeNicely(TerminatorInst *TI, unsigned SuccNum, Pass *P) {
|
||||
BranchInst *PredBr = dyn_cast<BranchInst>(Pred->getTerminator());
|
||||
if (!PredBr || !PredBr->isUnconditional() ||
|
||||
// Must be empty other than the branch.
|
||||
&Pred->front() != PredBr)
|
||||
&Pred->front() != PredBr ||
|
||||
// Cannot be the entry block; its label does not get emitted.
|
||||
Pred == &(Dest->getParent()->getEntryBlock()))
|
||||
continue;
|
||||
|
||||
// Finally, since we know that Dest has phi nodes in it, we have to make
|
||||
|
Loading…
Reference in New Issue
Block a user