diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-05-21 23:17:32 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-05-21 23:17:32 +0000 |
commit | 8c8afb27d7cba60022a2acc08f98d470e7c48980 (patch) | |
tree | a5558d99ac76aeaa1c152872f8785762949f2de1 /llvm/lib/Target/ARM/ARMInstrInfo.cpp | |
parent | d1de276c1697777c8a3f906ddfc9b43f09956d0a (diff) | |
download | bcm5719-llvm-8c8afb27d7cba60022a2acc08f98d470e7c48980.tar.gz bcm5719-llvm-8c8afb27d7cba60022a2acc08f98d470e7c48980.zip |
Fix some -march=thumb regressions. tBR_JTr is not predicable.
llvm-svn: 37272
Diffstat (limited to 'llvm/lib/Target/ARM/ARMInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrInfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.cpp b/llvm/lib/Target/ARM/ARMInstrInfo.cpp index 78f8de4d6d7..186c3dd587f 100644 --- a/llvm/lib/Target/ARM/ARMInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMInstrInfo.cpp @@ -498,7 +498,9 @@ unsigned ARM::GetInstSize(MachineInstr *MI) { // These are jumptable branches, i.e. a branch followed by an inlined // jumptable. The size is 4 + 4 * number of entries. 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(); const std::vector<MachineJumpTableEntry> &JT = MJTI->getJumpTables(); assert(JTI < JT.size()); |