mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-25 13:35:39 +00:00
[LCSSA] Assert that we always have a valid loop.
We could otherwise add BBs not belonging to a loop in `formLCSSA` and later crash when trying to iterate the loop blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300244 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
24b800cc1d
commit
c099906b13
@ -87,6 +87,7 @@ bool llvm::formLCSSAForInstructions(SmallVectorImpl<Instruction *> &Worklist,
|
||||
Instruction *I = Worklist.pop_back_val();
|
||||
BasicBlock *InstBB = I->getParent();
|
||||
Loop *L = LI.getLoopFor(InstBB);
|
||||
assert(L && "Instruction belongs to a BB that's not part of a loop");
|
||||
if (!LoopExitBlocks.count(L))
|
||||
L->getExitBlocks(LoopExitBlocks[L]);
|
||||
assert(LoopExitBlocks.count(L));
|
||||
|
Loading…
Reference in New Issue
Block a user