summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-08-09 16:06:54 +0000
committerDavide Italiano <davide@freebsd.org>2017-08-09 16:06:54 +0000
commit1a943a90f5ba346a9027efd95fd3f0876a117581 (patch)
treee124b6d3aa7084dfe072b734122bdbd005c5ca91 /llvm/lib/Analysis/ValueTracking.cpp
parent575323930738562647da59185ef3ec7da18282e5 (diff)
downloadbcm5719-llvm-1a943a90f5ba346a9027efd95fd3f0876a117581.tar.gz
bcm5719-llvm-1a943a90f5ba346a9027efd95fd3f0876a117581.zip
[ValueTracking] Turn a test into an assertion.
As discussed with Chad, this should never happen, but this assertion is basically free, so, keep it around just in case. llvm-svn: 310493
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 995b3e0c6de..b81bf9ec9d1 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -4531,9 +4531,7 @@ static Optional<bool> isImpliedCondAndOr(const BinaryOperator *LHS,
LHS->getOpcode() == Instruction::Or) &&
"Expected LHS to be 'and' or 'or'.");
- // The remaining tests are all recursive, so bail out if we hit the limit.
- if (Depth == MaxDepth)
- return None;
+ assert(Depth <= MaxDepth && "Hit recursion limit");
// If the result of an 'or' is false, then we know both legs of the 'or' are
// false. Similarly, if the result of an 'and' is true, then we know both
OpenPOWER on IntegriCloud