mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
Reverse branch condition only when there is a conditional branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0ab2dcee5b
commit
4b7f7a6e1f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user