diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp index 703952367f7..b313d548578 100644 --- a/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/lib/Target/ARM/ARMRegisterInfo.cpp @@ -106,8 +106,8 @@ ARMRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const { int FrameIndex = MI.getOperand(FrameIdx).getFrameIndex(); - int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex); - assert (MI.getOperand(OffIdx).getImmedValue() == 0); + int Offset = MF.getFrameInfo()->getObjectOffset(FrameIndex) + + MI.getOperand(OffIdx).getImmedValue(); unsigned StackSize = MF.getFrameInfo()->getStackSize(); diff --git a/test/CodeGen/ARM/long.ll b/test/CodeGen/ARM/long.ll index 834f0687101..b310bc00c03 100644 --- a/test/CodeGen/ARM/long.ll +++ b/test/CodeGen/ARM/long.ll @@ -70,3 +70,10 @@ entry: %tmp2 = mul ulong %tmp1, %tmp ret ulong %tmp2 } + +ulong %f10() { +entry: + %a = alloca ulong, align 8 + %retval = load ulong* %a + ret ulong %retval +}