Differential Revision: https://reviews.llvm.org/D36478
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310397
91177308-0d34-0410-b5e6-
96231b3b80d8
return createAggregateValueExpression(I);
}
const Expression *NewGVN::performSymbolicCmpEvaluation(Instruction *I) const {
- auto *CI = dyn_cast<CmpInst>(I);
+ assert(isa<CmpInst>(I) && "Expected a cmp instruction.");
+
+ auto *CI = cast<CmpInst>(I);
// See if our operands are equal to those of a previous predicate, and if so,
// if it implies true or false.
auto Op0 = lookupOperandLeader(CI->getOperand(0));