diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-09-23 19:42:03 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-09-23 19:42:03 +0000 |
| commit | 1596f7f6f31577de330790f86231b01c66747d65 (patch) | |
| tree | 773f398f7eb73d22f6bcb24ff4917db4b74e4734 /llvm/lib/Target | |
| parent | 836341a17ad3b314d8f05f1ba96824c2eb1c5dd1 (diff) | |
| download | bcm5719-llvm-1596f7f6f31577de330790f86231b01c66747d65.tar.gz bcm5719-llvm-1596f7f6f31577de330790f86231b01c66747d65.zip | |
Fix r114632. Return if the only terminator is an unconditional branch after the redundant ones are deleted.
llvm-svn: 114688
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index 7786de2c265..a0f0c390609 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -284,9 +284,11 @@ ARMBaseInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB, LastInst->eraseFromParent(); LastInst = SecondLastInst; LastOpc = LastInst->getOpcode(); - if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) - break; - else { + if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) { + // Return now the only terminator is an unconditional branch. + TBB = LastInst->getOperand(0).getMBB(); + return false; + } else { SecondLastInst = I; SecondLastOpc = SecondLastInst->getOpcode(); } |

