diff options
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index ba3ba7c..56eb3f9 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -528,7 +528,8 @@ bool llvm::isValidAssumeForContext(const Instruction *Inv, if (DT) { if (DT->dominates(Inv, CxtI)) return true; - } else if (Inv->getParent() == CxtI->getParent()->getSinglePredecessor()) { + } else if (Inv->getParent() == CxtI->getParent()->getSinglePredecessor() || + Inv->getParent()->isEntryBlock()) { // We don't have a DT, but this trivially dominates. return true; } |