diff options
| author | Max Kazantsev <max.kazantsev@azul.com> | 2019-02-04 09:55:18 +0000 |
|---|---|---|
| committer | Max Kazantsev <max.kazantsev@azul.com> | 2019-02-04 09:55:18 +0000 |
| commit | 65970aa24dd32328d00cf6560c21f2c5ff876c2d (patch) | |
| tree | 80950f2f572a4c7e1dd742ec35156aae9d97efa4 /llvm/lib/Transforms | |
| parent | 9e012e8b33c475d3c22f07add80d26981b44ed03 (diff) | |
| download | bcm5719-llvm-65970aa24dd32328d00cf6560c21f2c5ff876c2d.tar.gz bcm5719-llvm-65970aa24dd32328d00cf6560c21f2c5ff876c2d.zip | |
[NFC] Replace equivalent condition for better readability
llvm-svn: 353032
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/GuardWidening.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GuardWidening.cpp b/llvm/lib/Transforms/Scalar/GuardWidening.cpp index cb0ee7b741a..e7da37ebf8c 100644 --- a/llvm/lib/Transforms/Scalar/GuardWidening.cpp +++ b/llvm/lib/Transforms/Scalar/GuardWidening.cpp @@ -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); |

