projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df8fe99
)
Calculate GetBestDestForJumpOnUndef correctly.
author
Jakub Staszak
<jstaszak@apple.com>
Mon, 27 Jun 2011 21:51:12 +0000
(21:51 +0000)
committer
Jakub Staszak
<jstaszak@apple.com>
Mon, 27 Jun 2011 21:51:12 +0000
(21:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133946
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/JumpThreading.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/JumpThreading.cpp
b/lib/Transforms/Scalar/JumpThreading.cpp
index cf18ff040bdab2b6f871c7d5f6f0e699006db1f5..b500d5b4fdffb95b1ef617e14c066dcf9e9ea5eb 100644
(file)
--- a/
lib/Transforms/Scalar/JumpThreading.cpp
+++ b/
lib/Transforms/Scalar/JumpThreading.cpp
@@
-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;