[InstSimplify] Use cast instead of dyn_cast after isa<> check. NFCI

llvm-svn: 299870
This commit is contained in:
Craig Topper 2017-04-10 19:37:10 +00:00
parent 0c990bbe09
commit 0c19861051
1 changed files with 2 additions and 2 deletions

View File

@ -3107,8 +3107,8 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
// If both operands have range metadata, use the metadata
// to simplify the comparison.
if (isa<Instruction>(RHS) && isa<Instruction>(LHS)) {
auto RHS_Instr = dyn_cast<Instruction>(RHS);
auto LHS_Instr = dyn_cast<Instruction>(LHS);
auto RHS_Instr = cast<Instruction>(RHS);
auto LHS_Instr = cast<Instruction>(LHS);
if (RHS_Instr->getMetadata(LLVMContext::MD_range) &&
LHS_Instr->getMetadata(LLVMContext::MD_range)) {