[NFC] Assert that all blocks staying in loop are live

llvm-svn: 347458
This commit is contained in:
Max Kazantsev 2018-11-22 12:43:27 +00:00
parent 56a2443024
commit b565e6093b
1 changed files with 2 additions and 0 deletions

View File

@ -226,6 +226,8 @@ private:
// Sanity check: header must be in loop. // Sanity check: header must be in loop.
assert(BlocksInLoopAfterFolding.count(L.getHeader()) && assert(BlocksInLoopAfterFolding.count(L.getHeader()) &&
"Header not in loop?"); "Header not in loop?");
assert(BlocksInLoopAfterFolding.size() <= LiveLoopBlocks.size() &&
"All blocks that stay in loop should be live!");
} }
/// Constant-fold terminators of blocks acculumated in FoldCandidates into the /// Constant-fold terminators of blocks acculumated in FoldCandidates into the