diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-07-27 18:25:24 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-07-27 18:25:24 +0000 |
commit | 2c03f6d1089da3175a70901a832840fc56687fe9 (patch) | |
tree | f659a406ade0a65fe44f6b047fe703a6f52eebfd | |
parent | d61302a90452f1fe954eee036b1d79c5b082fa60 (diff) | |
download | external_llvm-2c03f6d1089da3175a70901a832840fc56687fe9.zip external_llvm-2c03f6d1089da3175a70901a832840fc56687fe9.tar.gz external_llvm-2c03f6d1089da3175a70901a832840fc56687fe9.tar.bz2 |
Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77221 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.cpp | 6 | ||||
-rw-r--r-- | lib/Target/ARM/ARMBaseInstrInfo.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index e058c8a..5703f6b 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -251,11 +251,7 @@ ARMBaseInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TBB, // ...likewise if it ends with a branch table followed by an unconditional // branch. The branch folder can create these, and we must get rid of them for // correctness of Thumb constant islands. - if ((SecondLastOpc == ARM::BR_JTr || - SecondLastOpc == ARM::BR_JTm || - SecondLastOpc == ARM::BR_JTadd || - SecondLastOpc == ARM::tBR_JTr || - SecondLastOpc == ARM::t2BR_JT) && + if (isJumpTableBranchOpcode(SecondLastOpc) && isUncondBranchOpcode(LastOpc)) { I = LastInst; if (AllowModify) diff --git a/lib/Target/ARM/ARMBaseInstrInfo.h b/lib/Target/ARM/ARMBaseInstrInfo.h index 375410d..e91d1eb 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.h +++ b/lib/Target/ARM/ARMBaseInstrInfo.h @@ -301,6 +301,11 @@ private: return Opc == ARM::Bcc || Opc == ARM::tBcc || Opc == ARM::t2Bcc; } + bool isJumpTableBranchOpcode(int Opc) const { + return Opc == ARM::BR_JTr || Opc == ARM::BR_JTm || Opc == ARM::BR_JTadd || + Opc == ARM::tBR_JTr || Opc == ARM::t2BR_JT; + } + int getMatchingCondBranchOpcode(int Opc) const; }; } |