diff options
author | Strahinja Petrovic <strahinja.petrovic@rt-rk.com> | 2017-08-01 13:42:45 +0000 |
---|---|---|
committer | Strahinja Petrovic <strahinja.petrovic@rt-rk.com> | 2017-08-01 13:42:45 +0000 |
commit | a2b4748bdc11ad679426be6b7fe67a3eff66063a (patch) | |
tree | e5d5f87295eceb31de0325cdd0c98bf2654492d7 /llvm/lib | |
parent | fa76b49cefd861a45d7ff2b55a53492978b0e015 (diff) | |
download | bcm5719-llvm-a2b4748bdc11ad679426be6b7fe67a3eff66063a.tar.gz bcm5719-llvm-a2b4748bdc11ad679426be6b7fe67a3eff66063a.zip |
[Mips] Fix for BBIT octeon instruction
This patch enables control flow optimization for
variations of BBIT instruction. In this case
optimization removes unnecessary branch after
BBIT instruction.
Differential Revision: https://reviews.llvm.org/D35359
llvm-svn: 309679
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/Mips/MipsSEInstrInfo.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp b/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp index ee074798563..9439c51a3ad 100644 --- a/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp +++ b/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp @@ -451,6 +451,10 @@ unsigned MipsSEInstrInfo::getOppositeBranchOpc(unsigned Opc) const { case Mips::BGEZC64: return Mips::BLTZC64; case Mips::BLTZC64: return Mips::BGEZC64; case Mips::BLEZC64: return Mips::BGTZC64; + case Mips::BBIT0: return Mips::BBIT1; + case Mips::BBIT1: return Mips::BBIT0; + case Mips::BBIT032: return Mips::BBIT132; + case Mips::BBIT132: return Mips::BBIT032; } } @@ -541,7 +545,9 @@ unsigned MipsSEInstrInfo::getAnalyzableBrOpc(unsigned Opc) const { Opc == Mips::BGEC64 || Opc == Mips::BGEUC64 || Opc == Mips::BLTC64 || Opc == Mips::BLTUC64 || Opc == Mips::BGTZC64 || Opc == Mips::BGEZC64 || Opc == Mips::BLTZC64 || - Opc == Mips::BLEZC64 || Opc == Mips::BC) ? Opc : 0; + Opc == Mips::BLEZC64 || Opc == Mips::BC || Opc == Mips::BBIT0 || + Opc == Mips::BBIT1 || Opc == Mips::BBIT032 || + Opc == Mips::BBIT132) ? Opc : 0; } void MipsSEInstrInfo::expandRetRA(MachineBasicBlock &MBB, |