summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips
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
commit28dc83ceb32009d5ac67d62135ed64b0f729c161 (patch)
tree2147484d26d118bfba8db5b09b4cd1a6e75f0394 /llvm/lib/Target/Mips
parent7320b2364da677c34452b193759511edcba6081f (diff)
downloadbcm5719-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.cpp4
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) {
OpenPOWER on IntegriCloud