From a9f3c7c50a0545da08a670001cc4c8692a6ce3c8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 1 May 2006 21:17:10 +0000 Subject: [PATCH] When promoting a load to a reg-reg copy, where the load was a previous instruction folded with spill code, make sure the remove the load from the virt reg folded map. llvm-svn: 28040 --- lib/CodeGen/VirtRegMap.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 7523d73c2e6..fa5a6ac8e80 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -712,6 +712,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) { NextMII = &MI; --NextMII; // backtrack to the copy. } + VRM.RemoveFromFoldedVirtMap(&MI); MBB.erase(&MI); goto ProcessNextInst; }