From c699eaa3119bf808971a067b34532b8cf4530766 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Mon, 5 Mar 2018 11:49:00 +0000 Subject: [PATCH] Fix location of comment in EmitPopInst Comment about folding return in LDM was not moved along with the corresponding code in r242714. This commit fixes that. llvm-svn: 326690 --- llvm/lib/Target/ARM/ARMFrameLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp index 9ad1608eda21..d0986a73b70f 100644 --- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp +++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp @@ -1068,6 +1068,7 @@ void ARMFrameLowering::emitPopInst(MachineBasicBlock &MBB, !isTrap && STI.hasV5TOps()) { if (MBB.succ_empty()) { Reg = ARM::PC; + // Fold the return instruction into the LDM. DeleteRet = true; LdmOpc = AFI->isThumbFunction() ? ARM::t2LDMIA_RET : ARM::LDMIA_RET; // We 'restore' LR into PC so it is not live out of the return block: @@ -1075,7 +1076,6 @@ void ARMFrameLowering::emitPopInst(MachineBasicBlock &MBB, Info.setRestored(false); } else LdmOpc = AFI->isThumbFunction() ? ARM::t2LDMIA_UPD : ARM::LDMIA_UPD; - // Fold the return instruction into the LDM. } // If NoGap is true, pop consecutive registers and then leave the rest