We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3643cbb commit 56b57e3Copy full SHA for 56b57e3
llvm/lib/Transforms/Scalar/GuardWidening.cpp
@@ -375,7 +375,7 @@ bool GuardWideningImpl::eliminateInstrViaWidening(
375
376
assert((i == (e - 1)) == (Instr->getParent() == CurBB) && "Bad DFS?");
377
378
- if (Instr->getParent() == CurBB && CurBB->getTerminator() != Instr) {
+ if (Instr->getParent() == CurBB && isGuard(Instr)) {
379
// Corner case: make sure we're only looking at guards strictly dominating
380
// GuardInst when visiting GuardInst->getParent().
381
auto NewEnd = std::find(I, E, Instr);
0 commit comments