Fix thinko in arm fast isel alloca rewrite.
authorEric Christopher <echristo@apple.com>
Tue, 12 Oct 2010 21:23:43 +0000 (21:23 +0000)
committerEric Christopher <echristo@apple.com>
Tue, 12 Oct 2010 21:23:43 +0000 (21:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116339 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMFastISel.cpp

index ee3a87e21d646041b39bf0479feae55c412b83f6..418a9852ebc0783e3378ad2716831cd1287758e1 100644 (file)
@@ -764,7 +764,7 @@ bool ARMFastISel::ARMEmitStore(EVT VT, unsigned SrcReg,
       break;
   }
 
-  if (SrcReg == ARM::SP)
+  if (DstReg == ARM::SP)
     TII.storeRegToStackSlot(*FuncInfo.MBB, *FuncInfo.InsertPt,
                             SrcReg, true /*isKill*/, Offset,
                             TLI.getRegClassFor(VT), TM.getRegisterInfo());