Invalidate last use of a reused register if the use is a deleted noop copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34839 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index 0f5c48a..7b8606c 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -937,6 +937,7 @@
DOUT << "Removing now-noop copy: " << MI;
MBB.erase(&MI);
VRM.RemoveFromFoldedVirtMap(&MI);
+ Spills.UpdateLastUse(Src, NULL);
Spills.disallowClobberPhysReg(VirtReg);
goto ProcessNextInst;
}