[NFC] Replace equivalent condition for better readability

llvm-svn: 353032
This commit is contained in:
Max Kazantsev 2019-02-04 09:55:18 +00:00
parent 9e012e8b33
commit 65970aa24d
1 changed files with 2 additions and 1 deletions

View File

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