From: Evan Cheng Date: Wed, 16 Nov 2011 03:33:08 +0000 (+0000) Subject: RescheduleKillAboveMI() must backtrack to before the rescheduled DBG_VALUE instructio... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2bee6a8bb74724263eadd550ee76417d6e6465a9;p=oota-llvm.git RescheduleKillAboveMI() must backtrack to before the rescheduled DBG_VALUE instructions. rdar://10451185 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144771 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 2e5111dee56..3e9a0e44e93 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1158,7 +1158,7 @@ TwoAddressInstructionPass::RescheduleKillAboveMI(MachineBasicBlock *MBB, --From; MBB->splice(InsertPos, MBB, From, To); - nmi = llvm::prior(mi); // Backtrack so we process the moved instruction. + nmi = llvm::prior(InsertPos); // Backtrack so we process the moved instr. DistanceMap.erase(DI); if (LV) {