Skip to content

Commit

Permalink
[NewGVN] Use a cast instead of a dyn_cast.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D36478

llvm-svn: 310397
  • Loading branch information
Chad Rosier committed Aug 8, 2017
1 parent 59e3ae8 commit 4d85259
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llvm/lib/Transforms/Scalar/NewGVN.cpp
Expand Up @@ -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));
Expand Down

0 comments on commit 4d85259

Please sign in to comment.