mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
Don't transform in another bad case: if the block is empty, it should be
simplified before we do this xform so that our cost model is accurate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f10a56a86f
commit
4b10591265
@ -729,7 +729,8 @@ void BranchFolder::OptimizeBlock(MachineBasicBlock *MBB) {
|
||||
//
|
||||
// In this case, we could actually be moving the return block *into* a
|
||||
// loop!
|
||||
if (DoTransform && !MBB->succ_empty() && !CanFallThrough(PriorTBB))
|
||||
if (DoTransform && !MBB->succ_empty() &&
|
||||
(!CanFallThrough(PriorTBB) || PriorTBB->empty()))
|
||||
DoTransform = false;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user