Skip to content

Commit 56b57e3

Browse files
author
Max Kazantsev
committed
[NFC] Make a check in GuardWidening more obvious
llvm-svn: 353038
1 parent 3643cbb commit 56b57e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/GuardWidening.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ bool GuardWideningImpl::eliminateInstrViaWidening(
375375

376376
assert((i == (e - 1)) == (Instr->getParent() == CurBB) && "Bad DFS?");
377377

378-
if (Instr->getParent() == CurBB && CurBB->getTerminator() != Instr) {
378+
if (Instr->getParent() == CurBB && isGuard(Instr)) {
379379
// Corner case: make sure we're only looking at guards strictly dominating
380380
// GuardInst when visiting GuardInst->getParent().
381381
auto NewEnd = std::find(I, E, Instr);

0 commit comments

Comments
 (0)