@@ -1287,7 +1287,7 @@ createReplacement(ICmpInst *ICmp, const Loop *L, BasicBlock *ExitingBB,
12871287 MaxIter = SE->getZeroExtendExpr (MaxIter, ARTy);
12881288 else if (SE->getTypeSizeInBits (ARTy) < SE->getTypeSizeInBits (MaxIterTy)) {
12891289 const SCEV *MinusOne = SE->getMinusOne (ARTy);
1290- auto *MaxAllowedIter = SE->getZeroExtendExpr (MinusOne, MaxIterTy);
1290+ const SCEV *MaxAllowedIter = SE->getZeroExtendExpr (MinusOne, MaxIterTy);
12911291 if (SE->isKnownPredicateAt (ICmpInst::ICMP_ULE, MaxIter, MaxAllowedIter, BI))
12921292 MaxIter = SE->getTruncateExpr (MaxIter, ARTy);
12931293 }
@@ -1299,7 +1299,7 @@ createReplacement(ICmpInst *ICmp, const Loop *L, BasicBlock *ExitingBB,
12991299 // So we manually construct umin(a - 1, b - 1).
13001300 SmallVector<const SCEV *, 4 > Elements;
13011301 if (auto *UMin = dyn_cast<SCEVUMinExpr>(MaxIter)) {
1302- for (auto *Op : UMin->operands ())
1302+ for (const SCEV *Op : UMin->operands ())
13031303 Elements.push_back (SE->getMinusSCEV (Op, SE->getOne (Op->getType ())));
13041304 MaxIter = SE->getUMinFromMismatchedTypes (Elements);
13051305 } else
@@ -1376,15 +1376,15 @@ static bool optimizeLoopExitWithUnknownExitCount(
13761376 for (auto *ICmp : LeafConditions) {
13771377 auto EL = SE->computeExitLimitFromCond (L, ICmp, Inverted,
13781378 /* ControlsExit*/ false );
1379- auto *ExitMax = EL.SymbolicMaxNotTaken ;
1379+ const SCEV *ExitMax = EL.SymbolicMaxNotTaken ;
13801380 if (isa<SCEVCouldNotCompute>(ExitMax))
13811381 continue ;
13821382 // They could be of different types (specifically this happens after
13831383 // IV widening).
13841384 auto *WiderType =
13851385 SE->getWiderType (ExitMax->getType (), MaxIter->getType ());
1386- auto *WideExitMax = SE->getNoopOrZeroExtend (ExitMax, WiderType);
1387- auto *WideMaxIter = SE->getNoopOrZeroExtend (MaxIter, WiderType);
1386+ const SCEV *WideExitMax = SE->getNoopOrZeroExtend (ExitMax, WiderType);
1387+ const SCEV *WideMaxIter = SE->getNoopOrZeroExtend (MaxIter, WiderType);
13881388 if (WideExitMax == WideMaxIter)
13891389 ICmpsFailingOnLastIter.insert (ICmp);
13901390 }
0 commit comments