[NFC] Make a check in GuardWidening more obvious

llvm-svn: 353038
This commit is contained in:
Max Kazantsev 2019-02-04 10:41:17 +00:00
parent 3643cbbf9c
commit 56b57e3f53
1 changed files with 1 additions and 1 deletions

View File

@ -375,7 +375,7 @@ bool GuardWideningImpl::eliminateInstrViaWidening(
assert((i == (e - 1)) == (Instr->getParent() == CurBB) && "Bad DFS?"); assert((i == (e - 1)) == (Instr->getParent() == CurBB) && "Bad DFS?");
if (Instr->getParent() == CurBB && CurBB->getTerminator() != Instr) { if (Instr->getParent() == CurBB && isGuard(Instr)) {
// Corner case: make sure we're only looking at guards strictly dominating // Corner case: make sure we're only looking at guards strictly dominating
// GuardInst when visiting GuardInst->getParent(). // GuardInst when visiting GuardInst->getParent().
auto NewEnd = std::find(I, E, Instr); auto NewEnd = std::find(I, E, Instr);