Lines Matching refs:SCEVConstant
253 cast<SCEVConstant>(this)->getValue()->printAsOperand(OS, false); in print()
384 return cast<SCEVConstant>(this)->getType(); in getType()
410 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(this)) in isZero()
416 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(this)) in isOne()
422 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(this)) in isAllOnesValue()
432 const SCEVConstant *SC = dyn_cast<SCEVConstant>(Mul->getOperand(0)); in isNonConstantNegative()
452 SCEV *S = new (SCEVAllocator) SCEVConstant(ID.Intern(SCEVAllocator), V); in getConstant()
723 const SCEVConstant *LC = cast<SCEVConstant>(LHS); in CompareSCEVComplexity()
724 const SCEVConstant *RC = cast<SCEVConstant>(RHS); in CompareSCEVComplexity()
1161 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op)) in getTruncateExpr()
1459 const SCEVConstant *StartC = dyn_cast<SCEVConstant>(Start); in proveNoWrapByVaryingStart()
1498 const SCEVConstant *ConstantTerm, in extractConstantWithoutWrapping()
1538 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op)) in getZeroExtendExpr()
1714 if (const auto *SC = dyn_cast<SCEVConstant>(Start)) { in getZeroExtendExpr()
1769 if (const auto *SC = dyn_cast<SCEVConstant>(SA->getOperand(0))) { in getZeroExtendExpr()
1807 if (auto *MulLHS = dyn_cast<SCEVConstant>(SM->getOperand(0))) in getZeroExtendExpr()
1840 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op)) in getSignExtendExpr()
1902 if (const auto *SC = dyn_cast<SCEVConstant>(SA->getOperand(0))) { in getSignExtendExpr()
2029 if (const auto *SC = dyn_cast<SCEVConstant>(Start)) { in getSignExtendExpr()
2077 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op)) in getAnyExtendExpr()
2149 while (const SCEVConstant *C = dyn_cast<SCEVConstant>(Ops[i])) { in CollectAddOperandsWithScales()
2161 if (Mul && isa<SCEVConstant>(Mul->getOperand(0))) { in CollectAddOperandsWithScales()
2163 Scale * cast<SCEVConstant>(Mul->getOperand(0))->getAPInt(); in CollectAddOperandsWithScales()
2237 isa<SCEVConstant>(Ops[0])) { in StrengthenNoWrapFlags()
2250 const APInt &C = cast<SCEVConstant>(Ops[0])->getAPInt(); in StrengthenNoWrapFlags()
2296 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getAddExpr()
2299 while (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(Ops[Idx])) { in getAddExpr()
2304 LHSC = cast<SCEVConstant>(Ops[0]); in getAddExpr()
2387 } else if (const SCEVConstant *C = dyn_cast<SCEVConstant>(Ops[i])) { in getAddExpr()
2399 } else if (const auto *C = dyn_cast<SCEVConstant>(M->getOperand(j))) { in getAddExpr()
2417 if (isa<SCEVConstant>(Fold) || isa<SCEVUnknown>(Fold)) in getAddExpr()
2498 if (isa<SCEVConstant>(MulOpSCEV)) in getAddExpr()
2779 FoundConstant |= isa<SCEVConstant>(S); in containsConstantInAddMulChain()
2814 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getMulExpr()
2817 while (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(Ops[Idx])) { in getMulExpr()
2822 LHSC = cast<SCEVConstant>(Ops[0]); in getMulExpr()
2856 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getMulExpr()
3066 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS)) { in getURemExpr()
3102 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS)) { in getUDivExpr()
3122 if (const SCEVConstant *Step = in getUDivExpr()
3123 dyn_cast<SCEVConstant>(AR->getStepRecurrence(*this))) { in getUDivExpr()
3140 const SCEVConstant *StartC = dyn_cast<SCEVConstant>(AR->getStart()); in getUDivExpr()
3190 dyn_cast<SCEVConstant>(OtherDiv->getRHS())) { in getUDivExpr()
3221 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(LHS)) { in getUDivExpr()
3241 static const APInt gcd(const SCEVConstant *C1, const SCEVConstant *C2) { in gcd()
3269 if (const SCEVConstant *RHSCst = dyn_cast<SCEVConstant>(RHS)) { in getUDivExactExpr()
3272 if (const auto *LHSCst = dyn_cast<SCEVConstant>(Mul->getOperand(0))) { in getUDivExactExpr()
3285 cast<SCEVConstant>(getConstant(LHSCst->getAPInt().udiv(Factor))); in getUDivExactExpr()
3287 cast<SCEVConstant>(getConstant(RHSCst->getAPInt().udiv(Factor))); in getUDivExactExpr()
3429 ConstantInt *Index = cast<SCEVConstant>(IndexExpr)->getValue(); in getGEPExpr()
3517 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) { in getMinMaxExpr()
3532 while (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(Ops[Idx])) { in getMinMaxExpr()
3539 LHSC = cast<SCEVConstant>(Ops[0]); in getMinMaxExpr()
3800 auto *ConstOp = dyn_cast<SCEVConstant>(Add->getOperand(0)); in splitAddExpr()
3916 if (const SCEVConstant *VC = dyn_cast<SCEVConstant>(V)) in getNegativeSCEV()
3942 if (const SCEVConstant *VC = dyn_cast<SCEVConstant>(V)) in getNotSCEV()
4322 bool IsOne = cast<SCEVConstant>(Res.getValue())->getValue()->isOne(); in visitUnknown()
5524 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S)) in GetMinTrailingZerosImpl()
5648 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(S)) in getRangeRef()
6002 if (!isa<SCEVConstant>(Step)) in getRangeForAffineNoSelfWrappingAR()
6082 if (SA->getNumOperands() != 2 || !isa<SCEVConstant>(SA->getOperand(0))) in getRangeViaFactoring()
6085 Offset = cast<SCEVConstant>(SA->getOperand(0))->getAPInt(); in getRangeViaFactoring()
6482 if (auto *OpC = dyn_cast<SCEVConstant>(LHSMul->getOperand(0))) { in createSCEV()
6699 if (isa<SCEVConstant>(Op)) in createSCEV()
6797 static unsigned getConstantTripCount(const SCEVConstant *ExitCount) { in getConstantTripCount()
6825 const SCEVConstant *ExitCount = in getSmallConstantTripCount()
6826 dyn_cast<SCEVConstant>(getExitCount(L, ExitingBlock)); in getSmallConstantTripCount()
6832 dyn_cast<SCEVConstant>(getConstantMaxBackedgeTakenCount(L)); in getSmallConstantMaxTripCount()
6869 const SCEVConstant *TC = dyn_cast<SCEVConstant>(TCExpr); in getSmallConstantTripMultiple()
7249 isa<SCEVConstant>(getConstantMax())) && in getConstantMax()
7287 isa<SCEVConstant>(MaxNotTaken)) && in ExitLimit()
7299 isa<SCEVConstant>(MaxNotTaken)) && in ExitLimit()
7311 isa<SCEVConstant>(MaxNotTaken)) &&
7319 isa<SCEVConstant>(MaxNotTaken)) && in ExitLimit()
7349 isa<SCEVConstant>(ConstantMax)) && in BackedgeTakenInfo()
7688 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS)) in computeExitLimitFromICmp()
7773 assert(isa<SCEVConstant>(Val) && in EvaluateConstantChrecAtConstant()
7775 return cast<SCEVConstant>(Val)->getValue(); in EvaluateConstantChrecAtConstant()
7828 !isa<SCEVConstant>(IdxExpr->getOperand(0)) || in computeLoadConstantCompareExitLimit()
7829 !isa<SCEVConstant>(IdxExpr->getOperand(1))) in computeLoadConstantCompareExitLimit()
8344 return cast<SCEVConstant>(V)->getValue(); in BuildConstantFromSCEV()
8446 if (isa<SCEVConstant>(V)) return V; in computeSCEVAtScope()
8492 if (auto *BTCC = dyn_cast<SCEVConstant>(BackedgeTakenCount)) { in computeSCEVAtScope()
8509 if (isa<SCEVConstant>(InputAtScope)) return InputAtScope; in computeSCEVAtScope()
8754 const SCEVConstant *LC = dyn_cast<SCEVConstant>(AddRec->getOperand(0)); in GetQuadraticEquation()
8755 const SCEVConstant *MC = dyn_cast<SCEVConstant>(AddRec->getOperand(1)); in GetQuadraticEquation()
8756 const SCEVConstant *NC = dyn_cast<SCEVConstant>(AddRec->getOperand(2)); in GetQuadraticEquation()
9022 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(V)) { in howFarToZero()
9047 const auto *R = cast<SCEVConstant>(getConstant(S.getValue())); in howFarToZero()
9078 const SCEVConstant *StepC = dyn_cast<SCEVConstant>(Step); in howFarToZero()
9151 if (const SCEVConstant *C = dyn_cast<SCEVConstant>(V)) { in howFarToNonZero()
9224 if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(LHS)) { in SimplifyICmpOperands()
9226 if (const SCEVConstant *RHSC = dyn_cast<SCEVConstant>(RHS)) { in SimplifyICmpOperands()
9254 if (const SCEVConstant *RC = dyn_cast<SCEVConstant>(RHS)) { in SimplifyICmpOperands()
9737 !isa<SCEVConstant>(ConstOp) || NonConstOp != X) in isKnownPredicateViaNoOverflow()
9740 OutY = cast<SCEVConstant>(ConstOp)->getAPInt(); in isKnownPredicateViaNoOverflow()
10184 if (isa<SCEVConstant>(RHS)) { in isImpliedCondBalancedTypes()
10200 if (isa<SCEVConstant>(RHS)) in isImpliedCondBalancedTypes()
10216 (isa<SCEVConstant>(FoundLHS) || isa<SCEVConstant>(FoundRHS))) { in isImpliedCondBalancedTypes()
10218 const SCEVConstant *C = nullptr; in isImpliedCondBalancedTypes()
10221 if (isa<SCEVConstant>(FoundLHS)) { in isImpliedCondBalancedTypes()
10222 C = cast<SCEVConstant>(FoundLHS); in isImpliedCondBalancedTypes()
10225 C = cast<SCEVConstant>(FoundRHS); in isImpliedCondBalancedTypes()
10350 if (isa<SCEVConstant>(Less) && isa<SCEVConstant>(More)) { in computeConstantDifference()
10351 const auto &M = cast<SCEVConstant>(More)->getAPInt(); in computeConstantDifference()
10352 const auto &L = cast<SCEVConstant>(Less)->getAPInt(); in computeConstantDifference()
10359 const SCEVConstant *C1 = nullptr, *C2 = nullptr; in computeConstantDifference()
10362 if ((C1 = dyn_cast<SCEVConstant>(LLess))) in computeConstantDifference()
10368 if ((C2 = dyn_cast<SCEVConstant>(LMore))) in computeConstantDifference()
10817 auto *Denominator = cast<SCEVConstant>(getSCEV(LR)); in isImpliedViaOperations()
10970 if (!isa<SCEVConstant>(RHS) || !isa<SCEVConstant>(FoundRHS)) in isImpliedCondOperandsViaRanges()
10979 const APInt &ConstFoundRHS = cast<SCEVConstant>(FoundRHS)->getAPInt(); in isImpliedCondOperandsViaRanges()
10991 const APInt &ConstRHS = cast<SCEVConstant>(RHS)->getAPInt(); in isImpliedCondOperandsViaRanges()
11228 if (isa<SCEVConstant>(BECount)) in howManyLessThans()
11230 else if (isa<SCEVConstant>(BECountIfBackedgeTaken)) { in howManyLessThans()
11318 const SCEV *MaxBECount = isa<SCEVConstant>(BECount) in howManyGreaterThans()
11335 if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(getStart())) in getNumIterationsInRange()
11350 if (any_of(operands(), [](const SCEV *Op) { return !isa<SCEVConstant>(Op); })) in getNumIterationsInRange()
11370 APInt A = cast<SCEVConstant>(getOperand(1))->getAPInt(); in getNumIterationsInRange()
11597 if (!isa<SCEVConstant>(Op)) in findArrayDimensionsRec()
11621 remove_if(Terms, [](const SCEV *E) { return isa<SCEVConstant>(E); }), in findArrayDimensionsRec()
11649 if (isa<SCEVConstant>(T)) in removeConstantFactors()
11658 if (!isa<SCEVConstant>(Op)) in removeConstantFactors()
11906 if (auto *Const = dyn_cast<SCEVConstant>(Expr)) in getIndexExpressionsFromGEP()
12511 const SCEV *visitConstant(const SCEVConstant *Constant) { in verify()
12564 if ((VerifySCEVStrict || isa<SCEVConstant>(Delta)) && !Delta->isZero()) { in verify()
12926 if (const auto *Step = dyn_cast<SCEVConstant>(AR->getStepRecurrence(SE))) in getImpliedFlags()
13162 if (Mul->getNumOperands() == 3 && isa<SCEVConstant>(Mul->getOperand(0))) in matchURem()
13261 if (isa<SCEVConstant>(RHS)) in applyLoopGuards()
13265 if (isa<SCEVConstant>(RHS) && in applyLoopGuards()
13266 cast<SCEVConstant>(RHS)->getValue()->isNullValue()) in applyLoopGuards()