Clean up.

llvm-svn: 77221
This commit is contained in:
Evan Cheng 2009-07-27 18:25:24 +00:00
parent 24be97df67
commit 8f2ed1bc5a
2 changed files with 6 additions and 5 deletions

View File

@ -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)

View File

@ -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;
};
}