PrologEpilogInserter: Rewrite API to determine callee save regsiters.
[oota-llvm.git] / lib / Target / ARM / Thumb1FrameLowering.cpp
index 77cd890e4cad32558b166e78bd602038227b0f75..3b4358b5d9bf449d08e2caf653efa9717cbdfddf 100644 (file)
@@ -365,7 +365,7 @@ void Thumb1FrameLowering::emitEpilogue(MachineFunction &MF,
       // frame pointer stack slot, the target is ELF and the function has FP, or
       // the target uses var sized objects.
       if (NumBytes) {
-        assert(MF.getRegInfo().isPhysRegUsed(ARM::R4) &&
+        assert(!MFI->getPristineRegs(MF).test(ARM::R4) &&
                "No scratch register to restore SP from FP!");
         emitThumbRegPlusImmediate(MBB, MBBI, dl, ARM::R4, FramePtr, -NumBytes,
                                   TII, *RegInfo);