Lines Matching refs:Step

1232 static const SCEV *getSignedOverflowLimitForStep(const SCEV *Step,  in getSignedOverflowLimitForStep()  argument
1235 unsigned BitWidth = SE->getTypeSizeInBits(Step->getType()); in getSignedOverflowLimitForStep()
1236 if (SE->isKnownPositive(Step)) { in getSignedOverflowLimitForStep()
1239 SE->getSignedRangeMax(Step)); in getSignedOverflowLimitForStep()
1241 if (SE->isKnownNegative(Step)) { in getSignedOverflowLimitForStep()
1244 SE->getSignedRangeMin(Step)); in getSignedOverflowLimitForStep()
1252 static const SCEV *getUnsignedOverflowLimitForStep(const SCEV *Step, in getUnsignedOverflowLimitForStep() argument
1255 unsigned BitWidth = SE->getTypeSizeInBits(Step->getType()); in getUnsignedOverflowLimitForStep()
1259 SE->getUnsignedRangeMax(Step)); in getUnsignedOverflowLimitForStep()
1288 static const SCEV *getOverflowLimitForStep(const SCEV *Step, in getOverflowLimitForStep()
1291 return getSignedOverflowLimitForStep(Step, Pred, SE); in getOverflowLimitForStep()
1304 static const SCEV *getOverflowLimitForStep(const SCEV *Step, in getOverflowLimitForStep()
1307 return getUnsignedOverflowLimitForStep(Step, Pred, SE); in getOverflowLimitForStep()
1331 const SCEV *Step = AR->getStepRecurrence(*SE); in getPreStartForExtend() local
1344 if (*It == Step) { in getPreStartForExtend()
1360 SE->getAddRecExpr(PreStart, Step, L, SCEV::FlagAnyWrap)); in getPreStartForExtend()
1376 (SE->*GetExtendExpr)(Step, WideTy, Depth)); in getPreStartForExtend()
1390 ExtendOpTraits<ExtendOpTy>::getOverflowLimitForStep(Step, &Pred, SE); in getPreStartForExtend()
1449 const SCEV *Step, in proveNoWrapByVaryingStart() argument
1469 ID.AddPointer(Step); in proveNoWrapByVaryingStart()
1518 const SCEV *Step) { in extractConstantWithoutWrapping() argument
1520 const uint32_t TZ = SE.getMinTrailingZeros(Step); in extractConstantWithoutWrapping()
1621 const SCEV *Step = AR->getStepRecurrence(*this); in getZeroExtendExprImpl() local
1630 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1631 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1655 const SCEV *ZMul = getMulExpr(CastedMaxBECount, Step, in getZeroExtendExprImpl()
1667 getZeroExtendExpr(Step, WideTy, Depth + 1), in getZeroExtendExprImpl()
1676 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1677 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1684 getSignExtendExpr(Step, WideTy, Depth + 1), in getZeroExtendExprImpl()
1694 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1695 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1719 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1720 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1725 if (isKnownNegative(Step)) { in getZeroExtendExprImpl()
1727 getSignedRangeMin(Step)); in getZeroExtendExprImpl()
1737 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1738 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1748 const APInt &D = extractConstantWithoutWrapping(*this, C, Step); in getZeroExtendExprImpl()
1752 getAddRecExpr(getConstant(C - D), Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1760 if (proveNoWrapByVaryingStart<SCEVZeroExtendExpr>(Start, Step, L)) { in getZeroExtendExprImpl()
1764 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getZeroExtendExprImpl()
1765 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getZeroExtendExprImpl()
1995 const SCEV *Step = AR->getStepRecurrence(*this); in getSignExtendExprImpl() local
2004 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2005 return getAddRecExpr(Start, Step, L, SCEV::FlagNSW); in getSignExtendExprImpl()
2030 const SCEV *SMul = getMulExpr(CastedMaxBECount, Step, in getSignExtendExprImpl()
2042 getSignExtendExpr(Step, WideTy, Depth + 1), in getSignExtendExprImpl()
2051 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2052 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2059 getZeroExtendExpr(Step, WideTy, Depth + 1), in getSignExtendExprImpl()
2076 Step = getZeroExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2077 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2091 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2092 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2100 const APInt &D = extractConstantWithoutWrapping(*this, C, Step); in getSignExtendExprImpl()
2104 getAddRecExpr(getConstant(C - D), Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
2112 if (proveNoWrapByVaryingStart<SCEVSignExtendExpr>(Start, Step, L)) { in getSignExtendExprImpl()
2116 Step = getSignExtendExpr(Step, Ty, Depth + 1); in getSignExtendExprImpl()
2117 return getAddRecExpr(Start, Step, L, AR->getNoWrapFlags()); in getSignExtendExprImpl()
3462 if (const SCEVConstant *Step = in getUDivExpr() local
3465 const APInt &StepInt = Step->getAPInt(); in getUDivExpr()
3470 getZeroExtendExpr(Step, ExtTy), in getUDivExpr()
3484 getZeroExtendExpr(Step, ExtTy), in getUDivExpr()
3490 getAddRecExpr(getConstant(StartInt - StartRem), Step, in getUDivExpr()
3648 const SCEV *ScalarEvolution::getAddRecExpr(const SCEV *Start, const SCEV *Step, in getAddRecExpr() argument
3653 if (const SCEVAddRecExpr *StepChrec = dyn_cast<SCEVAddRecExpr>(Step)) in getAddRecExpr()
3659 Operands.push_back(Step); in getAddRecExpr()
5141 const SCEV *Step = AR->getStepRecurrence(*this); in proveNoSignedWrapViaInduction() local
5172 getSignedOverflowLimitForStep(Step, &Pred, this); in proveNoSignedWrapViaInduction()
5194 const SCEV *Step = AR->getStepRecurrence(*this); in proveNoUnsignedWrapViaInduction() local
5224 if (isKnownPositive(Step)) { in proveNoUnsignedWrapViaInduction()
5226 getUnsignedRangeMax(Step)); in proveNoUnsignedWrapViaInduction()
6443 Value *Start, *Step; in getRangeForUnknownRecurrence() local
6444 if (!matchSimpleRecurrence(P, BO, Start, Step)) in getRangeForUnknownRecurrence()
6478 auto KnownStep = computeKnownBits(Step, DL, 0, &AC, nullptr, &DT); in getRangeForUnknownRecurrence()
6958 static ConstantRange getRangeForAffineARHelper(APInt Step, in getRangeForAffineARHelper() argument
6962 unsigned BitWidth = Step.getBitWidth(); in getRangeForAffineARHelper()
6967 if (Step == 0 || MaxBECount == 0) in getRangeForAffineARHelper()
6978 bool Descending = Signed && Step.isNegative(); in getRangeForAffineARHelper()
6985 Step = Step.abs(); in getRangeForAffineARHelper()
6989 if (APInt::getMaxValue(StartRange.getBitWidth()).udiv(Step).ult(MaxBECount)) in getRangeForAffineARHelper()
6994 APInt Offset = Step * MaxBECount; in getRangeForAffineARHelper()
7022 const SCEV *Step, in getRangeForAffineAR() argument
7025 getTypeSizeInBits(Step->getType()) && in getRangeForAffineAR()
7031 ConstantRange StepSRange = getSignedRange(Step); in getRangeForAffineAR()
7043 getUnsignedRangeMax(Step), getUnsignedRange(Start), MaxBECount, in getRangeForAffineAR()
7057 const SCEV *Step = AddRec->getStepRecurrence(*this); in getRangeForAffineNoSelfWrappingAR() local
7059 if (!isa<SCEVConstant>(Step)) in getRangeForAffineNoSelfWrappingAR()
7071 const SCEV *StepAbs = getUMinExpr(Step, getNegativeSCEV(Step)); in getRangeForAffineNoSelfWrappingAR()
7109 if (isKnownPositive(Step) && in getRangeForAffineNoSelfWrappingAR()
7112 if (isKnownNegative(Step) && in getRangeForAffineNoSelfWrappingAR()
7119 const SCEV *Step, in getRangeViaFactoring() argument
7126 getTypeSizeInBits(Step->getType()) == BitWidth && in getRangeViaFactoring()
7205 SelectPattern StepPattern(*this, BitWidth, Step); in getRangeViaFactoring()
10489 const SCEV *Step = getSCEVAtScope(AddRec->getOperand(1), L->getParentLoop()); in howFarToZero() local
10490 const SCEVConstant *StepC = dyn_cast<SCEVConstant>(Step); in howFarToZero()
10492 if (!isLoopInvariant(Step, L)) in howFarToZero()
10497 const SCEV *StepWLG = applyLoopGuards(Step, Guards); in howFarToZero()
10552 getUDivExpr(Distance, CountDown ? getNegativeSCEV(Step) : Step); in howFarToZero()
11043 const SCEV *Step = LHS->getStepRecurrence(*this); in getMonotonicPredicateTypeImpl() local
11045 if (isKnownNonNegative(Step)) in getMonotonicPredicateTypeImpl()
11048 if (isKnownNonPositive(Step)) in getMonotonicPredicateTypeImpl()
11190 const SCEV *Step = AR->getStepRecurrence(*this); in getLoopInvariantExitCondDuringFirstIterationsImpl() local
11191 auto *One = getOne(Step->getType()); in getLoopInvariantExitCondDuringFirstIterationsImpl()
11193 if (Step != One && Step != MinusOne) in getLoopInvariantExitCondDuringFirstIterationsImpl()
11214 if (Step == MinusOne) in getLoopInvariantExitCondDuringFirstIterationsImpl()
12849 const SCEV *Step = AR->getStepRecurrence(*this); in howManyLessThans() local
12853 getZeroExtendExpr(Step, Ty, 0), L, AR->getNoWrapFlags()); in howManyLessThans()
14639 const SCEV *Step = AR->getStepRecurrence(SE); in visitZeroExtendExpr() local
14643 SE.getSignExtendExpr(Step, Ty), L, in visitZeroExtendExpr()
14655 const SCEV *Step = AR->getStepRecurrence(SE); in visitSignExtendExpr() local
14659 SE.getSignExtendExpr(Step, Ty), L, in visitSignExtendExpr()
14824 if (const auto *Step = dyn_cast<SCEVConstant>(AR->getStepRecurrence(SE))) in getImpliedFlags() local
14825 if (Step->getValue()->getValue().isNonNegative()) in getImpliedFlags()