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:
0ab2dce
)
Reverse branch condition only when there is a conditional branch.
author
Evan Cheng
<evan.cheng@apple.com>
Fri, 8 May 2009 09:35:53 +0000
(09:35 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Fri, 8 May 2009 09:35:53 +0000
(09:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71214
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/CodePlacementOpt.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/CodePlacementOpt.cpp
b/lib/CodeGen/CodePlacementOpt.cpp
index f6a8421c43480a69486bb4832ee62a555334aa1b..4276651d3bc80a2d30b589df627d4bfd36eeac29 100644
(file)
--- a/
lib/CodeGen/CodePlacementOpt.cpp
+++ b/
lib/CodeGen/CodePlacementOpt.cpp
@@
-211,7
+211,8
@@
bool CodePlacementOpt::OptimizeIntraLoopEdges() {
} else if (!FBB && SSMBB == TBB && Cond.empty()) {
TBB = 0;
--Cost;
- } else if (!TII->ReverseBranchCondition(Cond)) {
+ } else if (!Cond.empty() && !TII->ReverseBranchCondition(Cond)) {
+ assert(SSMBB == TBB);
TBB = FBB;
FBB = 0;
--Cost;