diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-08-20 21:02:43 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-08-20 21:02:43 +0000 |
commit | 15c5c77fa04cd97e1057e8a585f669fc49da0d92 (patch) | |
tree | 9047e00a30ccb7b81dbe7227c8c883cbafb5d2dd /lib/Analysis/ValueTracking.cpp | |
parent | 4e20bb0468b8d0db13287e666b482eb93689be99 (diff) |
Diffstat (limited to 'lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | lib/Analysis/ValueTracking.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index 439b21a812587..cdfe74d158c95 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/lib/Analysis/ValueTracking.cpp @@ -4458,6 +4458,10 @@ Optional<bool> llvm::isImpliedCondition(const Value *LHS, const Value *RHS, unsigned Depth, AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT) { + // Bail out when we hit the limit. + if (Depth == MaxDepth) + return None; + // A mismatch occurs when we compare a scalar cmp to a vector cmp, for example. if (LHS->getType() != RHS->getType()) return None; |