From 29bed1c8bb491a5fe609d58c5e560929117a859e Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 21 Oct 2009 22:59:56 +0000 Subject: [PATCH] The spill restore needs to be resolved to the SP/FP just like the spill git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84792 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegisterScavenging.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index 5fa28d281a5..2518ce15209 100644 --- a/lib/CodeGen/RegisterScavenging.cpp +++ b/lib/CodeGen/RegisterScavenging.cpp @@ -310,6 +310,8 @@ unsigned RegScavenger::scavengeRegister(const TargetRegisterClass *RC, // Restore the scavenged register before its use (or first terminator). TII->loadRegFromStackSlot(*MBB, UseMI, SReg, ScavengingFrameIndex, RC); + II = prior(UseMI); + TRI->eliminateFrameIndex(II, SPAdj, NULL, this); } ScavengeRestore = prior(UseMI); -- 2.34.1