From c9a91fdaf99a138e9d0aee648c7bc5d04ac385cd Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 15 Oct 2010 23:07:10 +0000 Subject: [PATCH] Make sure offset is 0 for load/store register to the stack call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116640 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMFastISel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 901cb579fb1..cbfad2dace2 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -762,7 +762,7 @@ bool ARMFastISel::ARMEmitLoad(EVT VT, unsigned &ResultReg, assert((Base.Reg == ARM::SP || Offset == 0) && "Offset not zero and not a stack load!"); - if (Base.Reg == ARM::SP) + if (Base.Reg == ARM::SP && Offset == 0) TII.loadRegFromStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt, ResultReg, Base.FrameIndex, RC, TM.getRegisterInfo()); @@ -832,7 +832,7 @@ bool ARMFastISel::ARMEmitStore(EVT VT, unsigned SrcReg, break; } - if (Base.Reg == ARM::SP) + if (Base.Reg == ARM::SP && Offset == 0) TII.storeRegToStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt, SrcReg, true /*isKill*/, Base.FrameIndex, TLI.getRegClassFor(VT), TM.getRegisterInfo()); -- 2.34.1