aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index f8daf6a..30c64f1 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -2608,7 +2608,8 @@ static Optional<unsigned> getInvertibleOperand(const Operator *Op1,
cast<Operator>(BO2));
if (!Idx || *Idx != 0)
break;
- assert(BO1->getOperand(*Idx) == PN1 && BO2->getOperand(*Idx) == PN2);
+ if (BO1->getOperand(*Idx) != PN1 || BO2->getOperand(*Idx) != PN2)
+ break;
// Phi operands might not be in the same order. TODO: generalize
// interface to return pair of operands.