mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Calculate GetBestDestForJumpOnUndef correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df8fe9901d
commit
f227b50a8e
@ -600,8 +600,10 @@ static unsigned GetBestDestForJumpOnUndef(BasicBlock *BB) {
|
||||
for (unsigned i = 1, e = BBTerm->getNumSuccessors(); i != e; ++i) {
|
||||
TestBB = BBTerm->getSuccessor(i);
|
||||
unsigned NumPreds = std::distance(pred_begin(TestBB), pred_end(TestBB));
|
||||
if (NumPreds < MinNumPreds)
|
||||
if (NumPreds < MinNumPreds) {
|
||||
MinSucc = i;
|
||||
MinNumPreds = NumPreds;
|
||||
}
|
||||
}
|
||||
|
||||
return MinSucc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user