diff options
| author | Akira Hatanaka <ahatanaka@mips.com> | 2013-03-01 01:22:26 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-03-01 01:22:26 +0000 |
| commit | 28dc83ceb32009d5ac67d62135ed64b0f729c161 (patch) | |
| tree | 2147484d26d118bfba8db5b09b4cd1a6e75f0394 /llvm/lib/Target/Mips | |
| parent | 7320b2364da677c34452b193759511edcba6081f (diff) | |
| download | bcm5719-llvm-28dc83ceb32009d5ac67d62135ed64b0f729c161.tar.gz bcm5719-llvm-28dc83ceb32009d5ac67d62135ed64b0f729c161.zip | |
[mips] Do not add SecondLastInst to list BranchInstrs if there is only one
terminator.
No functionality change.
llvm-svn: 176326
Diffstat (limited to 'llvm/lib/Target/Mips')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.cpp b/llvm/lib/Target/Mips/MipsInstrInfo.cpp index be08f837d59..ad92d41209e 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.cpp +++ b/llvm/lib/Target/Mips/MipsInstrInfo.cpp @@ -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) { |

