Add assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125101 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2011-02-08 18:50:18 +00:00
parent f73311bb64
commit 01cb34b011

View File

@ -857,9 +857,10 @@ SlotIndex SplitEditor::leaveIntvAfter(SlotIndex Idx) {
}
DEBUG(dbgs() << ": valno " << ParentVNI->id << '\n');
MachineBasicBlock::iterator MII = LIS.getInstructionFromIndex(Idx);
VNInfo *VNI = defFromParent(0, ParentVNI, Idx,
*MII->getParent(), llvm::next(MII));
MachineInstr *MI = LIS.getInstructionFromIndex(Idx);
assert(MI && "No instruction at index");
VNInfo *VNI = defFromParent(0, ParentVNI, Idx, *MI->getParent(),
llvm::next(MachineBasicBlock::iterator(MI)));
return VNI->def;
}