Missed part of prev. patch
authorAnton Korobeynikov <asl@math.spbu.ru>
Thu, 16 Jul 2009 14:16:45 +0000 (14:16 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Thu, 16 Jul 2009 14:16:45 +0000 (14:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76008 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SystemZ/SystemZRegisterInfo.cpp

index dfd5336a204b8d032e5cd6c72e091a331b77c036..95daf7b95bfdc68ae41ca44f70585a44d50d48bd 100644 (file)
@@ -261,10 +261,12 @@ void SystemZRegisterInfo::emitEpilogue(MachineFunction &MF,
   // During callee-saved restores emission stack frame was not yet finialized
   // (and thus - the stack size was unknown). Tune the offset having full stack
   // size in hands.
-  if (SystemZMFI->getCalleeSavedFrameSize()) {
+  if (StackSize || MFI->hasCalls()) {
     assert((MBBI->getOpcode() == SystemZ::MOV64rmm ||
             MBBI->getOpcode() == SystemZ::MOV64rm) &&
            "Expected to see callee-save register restore code");
+    assert(MF.getRegInfo().isPhysRegUsed(SystemZ::R15D) &&
+           "Invalid stack frame calculation!");
 
     unsigned i = 0;
     MachineInstr &MI = *MBBI;