Fix some -march=thumb regressions. tBR_JTr is not predicable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-05-21 23:17:32 +00:00
parent f23b8cf239
commit 94679e66bb

View File

@ -498,7 +498,9 @@ unsigned ARM::GetInstSize(MachineInstr *MI) {
// These are jumptable branches, i.e. a branch followed by an inlined // These are jumptable branches, i.e. a branch followed by an inlined
// jumptable. The size is 4 + 4 * number of entries. // jumptable. The size is 4 + 4 * number of entries.
unsigned NumOps = TID->numOperands; unsigned NumOps = TID->numOperands;
unsigned JTI = MI->getOperand(NumOps-3).getJumpTableIndex(); MachineOperand JTOP =
MI->getOperand(NumOps - ((TID->Flags & M_PREDICABLE) ? 3 : 2));
unsigned JTI = JTOP.getJumpTableIndex();
MachineJumpTableInfo *MJTI = MF->getJumpTableInfo(); MachineJumpTableInfo *MJTI = MF->getJumpTableInfo();
const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables(); const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables();
assert(JTI < JT.size()); assert(JTI < JT.size());