diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-08 18:50:18 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-08 18:50:18 +0000 |
commit | 01cb34b0111a1e8792f327b56c51bc3bbaf83aca (patch) | |
tree | 415f39047ad35eb731c2f29498bb095f8f7899b5 /lib/CodeGen/SplitKit.cpp | |
parent | f73311bb646bf970806ba7caba220e6bffff7b49 (diff) | |
download | external_llvm-01cb34b0111a1e8792f327b56c51bc3bbaf83aca.zip external_llvm-01cb34b0111a1e8792f327b56c51bc3bbaf83aca.tar.gz external_llvm-01cb34b0111a1e8792f327b56c51bc3bbaf83aca.tar.bz2 |
Add assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.cpp')
-rw-r--r-- | lib/CodeGen/SplitKit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index 68f782d..0c2a2cf 100644 --- a/lib/CodeGen/SplitKit.cpp +++ b/lib/CodeGen/SplitKit.cpp @@ -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; } |