ARM: Avoid dereferencing end() in ARMFrameLowering::emitPrologue
ARM: Avoid dereferencing end() in ARMFrameLowering::emitPrologue

llvm::tryFoldSPUpdateIntoPushPop assumes its arguments are valid
MachineInstrs.  Update ARMFrameLowering::emitPrologue to respect that;
when LastPush==end(), it can't possibly be a push instruction anyway.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@278880 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 4a3738ebeb2d300bec8acfc7a096c00b68d8cbb5)

apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm