summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsInstrInfo.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-03-01 01:22:26 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-03-01 01:22:26 +0000
commit888e8fefd22550ccfa496c3c1e02bd2ac036263b (patch)
treec3c2dcb397aef1ec8af9a234c1ce8d04528cb1fb /lib/Target/Mips/MipsInstrInfo.cpp
parentd0a4b60df146b8c51555a752fed1530999ecbe64 (diff)
downloadllvm-888e8fefd22550ccfa496c3c1e02bd2ac036263b.tar.gz
llvm-888e8fefd22550ccfa496c3c1e02bd2ac036263b.tar.bz2
llvm-888e8fefd22550ccfa496c3c1e02bd2ac036263b.tar.xz
[mips] Do not add SecondLastInst to list BranchInstrs if there is only one
terminator. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrInfo.cpp')
-rw-r--r--lib/Target/Mips/MipsInstrInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsInstrInfo.cpp b/lib/Target/Mips/MipsInstrInfo.cpp
index be08f837d5..ad92d41209 100644
--- a/lib/Target/Mips/MipsInstrInfo.cpp
+++ b/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) {