diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index 2430161ecae..5193cf4ad0d 100644 --- a/lib/CodeGen/SplitKit.cpp +++ b/lib/CodeGen/SplitKit.cpp @@ -668,6 +668,7 @@ void SplitEditor::rewrite() { } if (LI) { MO.setReg(LI->reg); + sa_.removeUse(MI); DEBUG(dbgs() << " rewrite " << Idx << '\t' << *MI); } }