aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 82389b2..b4bbb66 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -823,6 +823,10 @@ bool LiveIntervals::JoinCopy(MachineInstr *CopyMI,
r2iMap_.erase(SrcReg);
r2rMap_[SrcReg] = DstReg;
+ // Finally, delete the copy instruction.
+ RemoveMachineInstrFromMaps(CopyMI);
+ CopyMI->eraseFromParent();
+ ++numPeep;
++numJoins;
return true;
}