diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/PredicateInfo.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/PredicateInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp index 280d3a9..d9bd77e 100644 --- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp +++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp @@ -837,7 +837,10 @@ Optional<PredicateConstraint> PredicateBase::getConstraint() const { } CmpInst *Cmp = dyn_cast<CmpInst>(Condition); - assert(Cmp && "Condition should be a CmpInst"); + if (!Cmp) { + // TODO: Make this an assertion once RenamedOp is fully accurate. + return None; + } CmpInst::Predicate Pred; Value *OtherOp; |