diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index d7b11b854602..b75db7d2babd 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -1832,9 +1832,9 @@ LinearFunctionTestReplace(Loop *L, if (isPtrIV) { Value *IVStart = IndVar->getIncomingValueForBlock(L->getLoopPreheader()); assert(AR->getStart() == SE->getSCEV(IVStart) && "bad loop counter"); - const PointerType *PointerTy = cast(IVStart->getType()); - assert(SE->getSizeOfExpr(PointerTy->getElementType())->isOne() && - "unit stride pointer IV must be i8*"); + assert(SE->getSizeOfExpr( + cast(IVStart->getType())->getElementType())->isOne() + && "unit stride pointer IV must be i8*"); Builder.SetInsertPoint(L->getLoopPreheader()->getTerminator()); ExitCnt = Builder.CreateGEP(IVStart, ExitCnt, "lftr.limit");