[NewGVN] Use a cast instead of a dyn_cast.

Differential Revision: https://reviews.llvm.org/D36478

llvm-svn: 310397
This commit is contained in:
Chad Rosier 2017-08-08 18:41:49 +00:00
parent 59e3ae827d
commit 4d852597f8
1 changed files with 3 additions and 1 deletions

View File

@ -1711,7 +1711,9 @@ NewGVN::performSymbolicAggrValueEvaluation(Instruction *I) const {
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));