Lines Matching refs:Step
1230 static const SCEV *getSignedOverflowLimitForStep(const SCEV *Step, in getSignedOverflowLimitForStep() argument
1233 unsigned BitWidth = SE->getTypeSizeInBits(Step->getType()); in getSignedOverflowLimitForStep()
1234 if (SE->isKnownPositive(Step)) { in getSignedOverflowLimitForStep()
1237 SE->getSignedRangeMax(Step)); in getSignedOverflowLimitForStep()
1239 if (SE->isKnownNegative(Step)) { in getSignedOverflowLimitForStep()
1242 SE->getSignedRangeMin(Step)); in getSignedOverflowLimitForStep()
1250 static const SCEV *getUnsignedOverflowLimitForStep(const SCEV *Step, in getUnsignedOverflowLimitForStep() argument
1253 unsigned BitWidth = SE->getTypeSizeInBits(Step->getType()); in getUnsignedOverflowLimitForStep()
1257 SE->getUnsignedRangeMax(Step)); in getUnsignedOverflowLimitForStep()
1286 static const SCEV *getOverflowLimitForStep(const SCEV *Step, in getOverflowLimitForStep()
1289 return getSignedOverflowLimitForStep(Step, Pred, SE); in getOverflowLimitForStep()
1302 static const SCEV *getOverflowLimitForStep(const SCEV *Step, in getOverflowLimitForStep()
1305 return getUnsignedOverflowLimitForStep(Step, Pred, SE); in getOverflowLimitForStep()
1329 const SCEV *Step = AR->getStepRecurrence(*SE); in getPreStartForExtend() local
1342 if (*It == Step) { in getPreStartForExtend()
1358 SE->getAddRecExpr(PreStart, Step, L, SCEV::FlagAnyWrap)); in getPreStartForExtend()
1374 (SE->*GetExtendExpr)(Step, WideTy, Depth)); in getPreStartForExtend()
1388 ExtendOpTraits<ExtendOpTy>::getOverflowLimitForStep(Step, &Pred, SE); in getPreStartForExtend()
1447 const SCEV *Step, in proveNoWrapByVaryingStart() argument
1467 ID.AddPointer(Step); in proveNoWrapByVaryingStart()
1516 const SCEV *Step) { in extractConstantWithoutWrapping() argument
1518 const uint32_t TZ = SE.getMinTrailingZeros(Step); in extractConstantWithoutWrapping()
1619 const SCEV *Step = AR->getStepRecurrence(*this); in getZeroExtendExprImpl() local
1628 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1629 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1653 const SCEV *ZMul = getMulExpr(CastedMaxBECount, Step, in getZeroExtendExprImpl()
1665 getZeroExtendExpr(Step, WideTy, Depth + 1), in getZeroExtendExprImpl()
1674 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1675 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1682 getSignExtendExpr(Step, WideTy, Depth + 1), in getZeroExtendExprImpl()
1692 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1693 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1717 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1718 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1723 if (isKnownNegative(Step)) { in getZeroExtendExprImpl()
1725 getSignedRangeMin(Step)); in getZeroExtendExprImpl()
1735 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1736 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1746 const APInt &D = extractConstantWithoutWrapping(*this, C, Step); in getZeroExtendExprImpl()
1750 getAddRecExpr(getConstant(C - D), Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1758 if (proveNoWrapByVaryingStart<SCEVZeroExtendExpr>(Start, Step, L)) { in getZeroExtendExprImpl()
1762 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1763 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1993 const SCEV *Step = AR->getStepRecurrence(*this); in getSignExtendExprImpl() local
2002 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2003 return getAddRecExpr(Start, Step, L, SCEV::FlagNSW); in getSignExtendExprImpl()
2028 const SCEV *SMul = getMulExpr(CastedMaxBECount, Step, in getSignExtendExprImpl()
2040 getSignExtendExpr(Step, WideTy, Depth + 1), in getSignExtendExprImpl()
2049 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2050 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2057 getZeroExtendExpr(Step, WideTy, Depth + 1), in getSignExtendExprImpl()
2074 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2075 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2089 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2090 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2098 const APInt &D = extractConstantWithoutWrapping(*this, C, Step); in getSignExtendExprImpl()
2102 getAddRecExpr(getConstant(C - D), Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2110 if (proveNoWrapByVaryingStart<SCEVSignExtendExpr>(Start, Step, L)) { in getSignExtendExprImpl()
2114 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2115 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
3460 if (const SCEVConstant *Step = in getUDivExpr() local
3463 const APInt &StepInt = Step->getAPInt(); in getUDivExpr()
3468 getZeroExtendExpr(Step, ExtTy), in getUDivExpr()
3482 getZeroExtendExpr(Step, ExtTy), in getUDivExpr()
3488 getAddRecExpr(getConstant(StartInt - StartRem), Step, in getUDivExpr()
3646 const SCEV *ScalarEvolution::getAddRecExpr(const SCEV *Start, const SCEV *Step, in getAddRecExpr() argument
3651 if (const SCEVAddRecExpr *StepChrec = dyn_cast<SCEVAddRecExpr>(Step)) in getAddRecExpr()
3657 Operands.push_back(Step); in getAddRecExpr()
5136 const SCEV *Step = AR->getStepRecurrence(*this); in proveNoSignedWrapViaInduction() local
5167 getSignedOverflowLimitForStep(Step, &Pred, this); in proveNoSignedWrapViaInduction()
5189 const SCEV *Step = AR->getStepRecurrence(*this); in proveNoUnsignedWrapViaInduction() local
5219 if (isKnownPositive(Step)) { in proveNoUnsignedWrapViaInduction()
5221 getUnsignedRangeMax(Step)); in proveNoUnsignedWrapViaInduction()
6427 Value *Start, *Step; in getRangeForUnknownRecurrence() local
6428 if (!matchSimpleRecurrence(P, BO, Start, Step)) in getRangeForUnknownRecurrence()
6462 auto KnownStep = computeKnownBits(Step, DL, 0, &AC, nullptr, &DT); in getRangeForUnknownRecurrence()
6942 static ConstantRange getRangeForAffineARHelper(APInt Step, in getRangeForAffineARHelper() argument
6946 unsigned BitWidth = Step.getBitWidth(); in getRangeForAffineARHelper()
6951 if (Step == 0 || MaxBECount == 0) in getRangeForAffineARHelper()
6962 bool Descending = Signed && Step.isNegative(); in getRangeForAffineARHelper()
6969 Step = Step.abs(); in getRangeForAffineARHelper()
6973 if (APInt::getMaxValue(StartRange.getBitWidth()).udiv(Step).ult(MaxBECount)) in getRangeForAffineARHelper()
6978 APInt Offset = Step * MaxBECount; in getRangeForAffineARHelper()
7006 const SCEV *Step, in getRangeForAffineAR() argument
7009 getTypeSizeInBits(Step->getType()) && in getRangeForAffineAR()
7015 ConstantRange StepSRange = getSignedRange(Step); in getRangeForAffineAR()
7027 getUnsignedRangeMax(Step), getUnsignedRange(Start), MaxBECount, in getRangeForAffineAR()
7041 const SCEV *Step = AddRec->getStepRecurrence(*this); in getRangeForAffineNoSelfWrappingAR() local
7043 if (!isa<SCEVConstant>(Step)) in getRangeForAffineNoSelfWrappingAR()
7055 const SCEV *StepAbs = getUMinExpr(Step, getNegativeSCEV(Step)); in getRangeForAffineNoSelfWrappingAR()
7093 if (isKnownPositive(Step) && in getRangeForAffineNoSelfWrappingAR()
7096 if (isKnownNegative(Step) && in getRangeForAffineNoSelfWrappingAR()
7103 const SCEV *Step, in getRangeViaFactoring() argument
7110 getTypeSizeInBits(Step->getType()) == BitWidth && in getRangeViaFactoring()
7189 SelectPattern StepPattern(*this, BitWidth, Step); in getRangeViaFactoring()
10428 const SCEV *Step = getSCEVAtScope(AddRec->getOperand(1), L->getParentLoop()); in howFarToZero() local
10436 const SCEVConstant *StepC = dyn_cast<SCEVConstant>(Step); in howFarToZero()
10483 getUDivExpr(Distance, CountDown ? getNegativeSCEV(Step) : Step); in howFarToZero()
10965 const SCEV *Step = LHS->getStepRecurrence(*this); in getMonotonicPredicateTypeImpl() local
10967 if (isKnownNonNegative(Step)) in getMonotonicPredicateTypeImpl()
10970 if (isKnownNonPositive(Step)) in getMonotonicPredicateTypeImpl()
11112 const SCEV *Step = AR->getStepRecurrence(*this); in getLoopInvariantExitCondDuringFirstIterationsImpl() local
11113 auto *One = getOne(Step->getType()); in getLoopInvariantExitCondDuringFirstIterationsImpl()
11115 if (Step != One && Step != MinusOne) in getLoopInvariantExitCondDuringFirstIterationsImpl()
11136 if (Step == MinusOne) in getLoopInvariantExitCondDuringFirstIterationsImpl()
12771 const SCEV *Step = AR->getStepRecurrence(*this); in howManyLessThans() local
12775 getZeroExtendExpr(Step, Ty, 0), L, AR->getNoWrapFlags()); in howManyLessThans()
14477 const SCEV *Step = AR->getStepRecurrence(SE); in visitZeroExtendExpr() local
14481 SE.getSignExtendExpr(Step, Ty), L, in visitZeroExtendExpr()
14493 const SCEV *Step = AR->getStepRecurrence(SE); in visitSignExtendExpr() local
14497 SE.getSignExtendExpr(Step, Ty), L, in visitSignExtendExpr()
14662 if (const auto *Step = dyn_cast<SCEVConstant>(AR->getStepRecurrence(SE))) in getImpliedFlags() local
14663 if (Step->getValue()->getValue().isNonNegative()) in getImpliedFlags()