Lines Matching defs:Start
1237 // Start),+,Step} => {(Step + sext/zext(Start),+,Step} As a result, the
1247 const SCEV *Start = AR->getStart();
1251 const SCEVAddExpr *SA = dyn_cast<SCEVAddExpr>(Start);
1291 if ((SE->*GetExtendExpr)(Start, WideTy) == OperandExtendedStart) {
1313 // Get the normalized zero or sign extended expression for this AddRec's Start.
1357 // In the current context, S is `Start`, X is `Step`, Ext is `ExtendOpTy` and T
1361 bool ScalarEvolution::proveNoWrapByVaryingStart(const SCEV *Start,
1366 // We restrict `Start` to a constant to prevent SCEV from spending too much
1368 // non-constant `Start` and do a general SCEV subtraction to compute
1371 const SCEVConstant *StartC = dyn_cast<SCEVConstant>(Start);
1449 const SCEV *Start = AR->getStart();
1482 getTruncateOrZeroExtend(MaxBECount, Start->getType());
1487 // Check whether Start+Step*MaxBECount has no unsigned overflow.
1489 const SCEV *ZAdd = getZeroExtendExpr(getAddExpr(Start, ZMul), WideTy);
1490 const SCEV *WideStart = getZeroExtendExpr(Start, WideTy);
1534 // a comparison with the start value and the backedge is
1541 (isLoopEntryGuardedByCond(L, ICmpInst::ICMP_ULT, Start, N) &&
1556 (isLoopEntryGuardedByCond(L, ICmpInst::ICMP_UGT, Start, N) &&
1571 if (proveNoWrapByVaryingStart<SCEVZeroExtendExpr>(Start, Step, L)) {
1676 const SCEV *Start = AR->getStart();
1709 getTruncateOrZeroExtend(MaxBECount, Start->getType());
1714 // Check whether Start+Step*MaxBECount has no signed overflow.
1716 const SCEV *SAdd = getSignExtendExpr(getAddExpr(Start, SMul), WideTy);
1717 const SCEV *WideStart = getSignExtendExpr(Start, WideTy);
1769 // a comparison with the start value and the backedge is
1777 (isLoopEntryGuardedByCond(L, Pred, Start, OverflowLimit) &&
1788 // If Start and Step are constants, check if we can apply this
1791 auto *SC1 = dyn_cast<SCEVConstant>(Start);
1798 Start = getSignExtendExpr(Start, Ty);
1801 return getAddExpr(Start, getSignExtendExpr(NewAR, Ty));
1805 if (proveNoWrapByVaryingStart<SCEVSignExtendExpr>(Start, Step, L)) {
2299 // NLI + LI + {Start,+,Step} --> NLI + {LI+Start,+,Step}
2306 // will be equal to its start value.
2557 // NLI * LI * {Start,+,Step} --> NLI * {LI*Start,+,LI*Step}
2863 const SCEV *ScalarEvolution::getAddRecExpr(const SCEV *Start, const SCEV *Step,
2867 Operands.push_back(Start);
4039 const SCEV *Start = SCEVInitRewriter::rewrite(Shifted, L, *this);
4041 Start != getCouldNotCompute()) {
4043 if (Start == StartVal) {
4599 ConstantRange ScalarEvolution::getRangeForAffineAR(const SCEV *Start,
4613 MaxBECount = getNoopOrZeroExtend(MaxBECount, Start->getType());
4621 ConstantRange StartURange = getUnsignedRange(Start);
4640 ConstantRange StartSRange = getSignedRange(Start);
4664 ConstantRange ScalarEvolution::getRangeViaFactoring(const SCEV *Start,
4687 // {Start+Step,+,Step} too.
4743 SelectPattern StartPattern(*this, BitWidth, Start);
4881 // We start by assuming \c I, the post-inc add recurrence, is poison. Only
7091 // Start + Step*N = 0 (mod 2^BW)
7095 // Step*N = -Start (mod 2^BW)
7097 // where BW is the common bit width of Start and Step.
7100 const SCEV *Start = getSCEVAtScope(AddRec->getStart(), L->getParentLoop());
7107 // to 0, it must be counting down to equal 0. Consequently, N = Start / -Step.
7114 // N = -Start/Step (as unsigned)
7116 // N = Start/-Step
7119 const SCEV *Distance = CountDown ? Start : getNegativeSCEV(Start);
7122 // 1*N = -Start; -1*N = Start (mod 2^BW), so:
7125 ConstantRange CR = getUnsignedRange(Start);
7206 // Then, try to solve the above equation provided that Start is constant.
7207 if (const SCEVConstant *StartC = dyn_cast<SCEVConstant>(Start)) {
8675 const SCEV *Start = IV->getStart();
8677 if (!isLoopEntryGuardedByCond(L, Cond, getMinusSCEV(Start, Stride), RHS))
8678 End = IsSigned ? getSMaxExpr(RHS, Start) : getUMaxExpr(RHS, Start);
8680 const SCEV *BECount = computeBECount(getMinusSCEV(End, Start), Stride, false);
8682 APInt MinStart = IsSigned ? getSignedRange(Start).getSignedMin()
8683 : getUnsignedRange(Start).getUnsignedMin();
8693 // the case End = RHS. This is safe because in the other case (End - Start)
8751 const SCEV *Start = IV->getStart();
8753 if (!isLoopEntryGuardedByCond(L, Cond, getAddExpr(Start, Stride), RHS))
8754 End = IsSigned ? getSMinExpr(RHS, Start) : getUMinExpr(RHS, Start);
8756 const SCEV *BECount = computeBECount(getMinusSCEV(Start, End), Stride, false);
8758 APInt MaxStart = IsSigned ? getSignedRange(Start).getSignedMax()
8759 : getUnsignedRange(Start).getUnsignedMax();
8769 // the case End = RHS. This is safe because in the other case (Start - End)
8794 // If the start is a non-zero constant, shift the range to simplify things.
8814 // that the start element is zero.
9333 /// is the offset start of the array. The SCEV->delinearize algorithm computes