mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
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. llvm-svn: 278880
This commit is contained in:
parent
ca18e893b4
commit
85cf053288
@ -413,7 +413,8 @@ void ARMFrameLowering::emitPrologue(MachineFunction &MF,
|
||||
// .cfi_offset operations will reflect that.
|
||||
if (DPRGapSize) {
|
||||
assert(DPRGapSize == 4 && "unexpected alignment requirements for DPRs");
|
||||
if (tryFoldSPUpdateIntoPushPop(STI, MF, &*LastPush, DPRGapSize))
|
||||
if (LastPush != MBB.end() &&
|
||||
tryFoldSPUpdateIntoPushPop(STI, MF, &*LastPush, DPRGapSize))
|
||||
DefCFAOffsetCandidates.addExtraBytes(LastPush, DPRGapSize);
|
||||
else {
|
||||
emitSPUpdate(isARM, MBB, MBBI, dl, TII, -DPRGapSize,
|
||||
|
Loading…
x
Reference in New Issue
Block a user