1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Reverse branch condition only when there is a conditional branch.

llvm-svn: 71214
This commit is contained in:
Evan Cheng 2009-05-08 09:35:53 +00:00
parent a8f179d44b
commit 10038ab095

View File

@ -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;