[llvm] r299870 - [InstSimplify] Use cast instead of dyn_cast after isa<> check. NFCI
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 12:37:11 PDT 2017
Author: ctopper
Date: Mon Apr 10 14:37:10 2017
New Revision: 299870
URL: http://llvm.org/viewvc/llvm-project?rev=299870&view=rev
Log:
[InstSimplify] Use cast instead of dyn_cast after isa<> check. NFCI
Modified:
llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=299870&r1=299869&r2=299870&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Mon Apr 10 14:37:10 2017
@@ -3107,8 +3107,8 @@ static Value *SimplifyICmpInst(unsigned
// 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)) {
More information about the llvm-commits
mailing list