From 160521095b3fc292e6a3f8ff1ff7c819721c7b41 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 13 Jul 2009 21:43:08 +0000 Subject: [PATCH] Fix FP elimination code to work for Thumb-2 addrmode AddrModeT2_so. This fixes SingleSource/Benchmarks/Stanford/Queens (among others). llvm-svn: 75513 --- llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp index c93473d62e63..41b061a12376 100644 --- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp @@ -1121,18 +1121,22 @@ eliminateFrameIndex(MachineBasicBlock::iterator II, break; } case ARMII::AddrModeT2_i12: { - ImmIdx = i+2; + ImmIdx = i+1; InstrOffs = MI.getOperand(ImmIdx).getImm(); NumBits = 12; break; } - case ARMII::AddrModeT2_so: case ARMII::AddrModeT2_i8: { - ImmIdx = i+2; + ImmIdx = i+1; InstrOffs = MI.getOperand(ImmIdx).getImm(); NumBits = 8; break; } + case ARMII::AddrModeT2_so: { + ImmIdx = i+2; + InstrOffs = MI.getOperand(ImmIdx).getImm(); + break; + } default: LLVM_UNREACHABLE("Unsupported addressing mode!"); break;