forked from OSchip/llvm-project
Calculate GetBestDestForJumpOnUndef correctly.
llvm-svn: 133946
This commit is contained in:
parent
1a13cd77f1
commit
423651e46a
|
@ -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…
Reference in New Issue