1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[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
This commit is contained in:
Davide Italiano 2017-08-09 16:06:54 +00:00
parent df829646fb
commit bdab27da36

View File

@ -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