diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index 40faee5ecd97c8..5c976d57485428 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -2101,7 +2101,7 @@ Value *SCEVExpander::generateOverflowCheck(const SCEVAddRecExpr *AR, bool NeedPosCheck = !SE.isKnownNegative(Step); bool NeedNegCheck = !SE.isKnownPositive(Step); - if (PointerType *ARPtrTy = dyn_cast(ARTy)) { + if (isa(ARTy)) { Value *NegMulV = Builder.CreateNeg(MulV); if (NeedPosCheck) Add = Builder.CreateGEP(Builder.getInt8Ty(), StartValue, MulV);