[mips] Do not add SecondLastInst to list BranchInstrs if there is only one

terminator.

No functionality change.

llvm-svn: 176326
This commit is contained in:
Akira Hatanaka 2013-03-01 01:22:26 +00:00
parent 7320b2364d
commit 28dc83ceb3
1 changed files with 2 additions and 2 deletions

View File

@ -226,8 +226,6 @@ AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
return BT_None;
}
BranchInstrs.insert(BranchInstrs.begin(), SecondLastInst);
// If there is only one terminator instruction, process it.
if (!SecondLastOpc) {
// Unconditional branch
@ -246,6 +244,8 @@ AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
if (++I != REnd && isUnpredicatedTerminator(&*I))
return BT_None;
BranchInstrs.insert(BranchInstrs.begin(), SecondLastInst);
// If second to last instruction is an unconditional branch,
// analyze it and remove the last instruction.
if (SecondLastOpc == UncondBrOpc) {