diff --git a/lib/Analysis/OverflowInstAnalysis.cpp b/lib/Analysis/OverflowInstAnalysis.cpp index 2456ae9dd28..9f17d5b2064 100644 --- a/lib/Analysis/OverflowInstAnalysis.cpp +++ b/lib/Analysis/OverflowInstAnalysis.cpp @@ -38,7 +38,8 @@ bool llvm::isCheckForZeroAndMulWithOverflow(Value *Op0, Value *Op1, bool IsAnd, return false; II = dyn_cast(Extract->getAggregateOperand()); - if (!match(II, m_CombineOr(m_Intrinsic(), + if (!II || + !match(II, m_CombineOr(m_Intrinsic(), m_Intrinsic()))) return false;