From cc2037be2cf0159e9f7a917a4db434258fe6eb6b Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Wed, 15 Feb 2012 23:21:33 +0000 Subject: Make LiveIntervals::handleMove() bundle aware. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150630 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveIntervalAnalysis.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp') diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index a8aa21a96a..0bf47322ba 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -963,13 +963,15 @@ static void handleMoveUses(const MachineBasicBlock *mbb, } } -void LiveIntervals::handleMove(MachineInstr *mi) { + + +void LiveIntervals::handleMove(MachineInstr* mi) { SlotIndex origIdx = indexes_->getInstructionIndex(mi); indexes_->removeMachineInstrFromMaps(mi); - SlotIndex miIdx = indexes_->insertMachineInstrInMaps(mi); - + SlotIndex miIdx = mi->isInsideBundle() ? + indexes_->getInstructionIndex(mi->getBundleStart()) : + indexes_->insertMachineInstrInMaps(mi); MachineBasicBlock* mbb = mi->getParent(); - assert(getMBBStartIdx(mbb) <= origIdx && origIdx < getMBBEndIdx(mbb) && "Cannot handle moves across basic block boundaries."); assert(!mi->isBundled() && "Can't handle bundled instructions yet."); -- cgit v1.2.3