[llvm-commits] [llvm] r116640 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Eric Christopher echristo at apple.com
Fri Oct 15 16:07:10 PDT 2010


Author: echristo
Date: Fri Oct 15 18:07:10 2010
New Revision: 116640

URL: http://llvm.org/viewvc/llvm-project?rev=116640&view=rev
Log:
Make sure offset is 0 for load/store register to the stack call.

Modified:
    llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=116640&r1=116639&r2=116640&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Fri Oct 15 18:07:10 2010
@@ -762,7 +762,7 @@
   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 @@
       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());





More information about the llvm-commits mailing list