summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/CFG.cpp')
-rw-r--r--llvm/lib/Analysis/CFG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/CFG.cpp b/llvm/lib/Analysis/CFG.cpp
index 44191f094e2..18b83d6838c 100644
--- a/llvm/lib/Analysis/CFG.cpp
+++ b/llvm/lib/Analysis/CFG.cpp
@@ -254,8 +254,8 @@ bool llvm::isPotentiallyReachable(
}
if (DT) {
- if (DT->isReachableFromEntry(A->getParent()) !=
- DT->isReachableFromEntry(B->getParent()))
+ if (DT->isReachableFromEntry(A->getParent()) &&
+ !DT->isReachableFromEntry(B->getParent()))
return false;
if (!ExclusionSet || ExclusionSet->empty()) {
if (A->getParent() == &A->getParent()->getParent()->getEntryBlock() &&
OpenPOWER on IntegriCloud