add the immediate to the Offset in eliminateFrameIndex

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30998 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2006-10-17 14:34:02 +00:00
parent a1a19f803c
commit 0d479ecbb1
2 changed files with 9 additions and 2 deletions

View File

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

View File

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