Lines Matching refs:AR
325 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) in DoInitialMatch() local
326 if (!AR->getStart()->isZero()) { in DoInitialMatch()
327 DoInitialMatch(AR->getStart(), L, Good, Bad, SE); in DoInitialMatch()
328 DoInitialMatch(SE.getAddRecExpr(SE.getConstant(AR->getType(), 0), in DoInitialMatch()
329 AR->getStepRecurrence(SE), in DoInitialMatch()
331 AR->getLoop(), SCEV::FlagAnyWrap), in DoInitialMatch()
509 static bool isAddRecSExtable(const SCEVAddRecExpr *AR, ScalarEvolution &SE) { in isAddRecSExtable() argument
511 IntegerType::get(SE.getContext(), SE.getTypeSizeInBits(AR->getType()) + 1); in isAddRecSExtable()
512 return isa<SCEVAddRecExpr>(SE.getSignExtendExpr(AR, WideTy)); in isAddRecSExtable()
569 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LHS)) { in getExactSDiv() local
570 if (IgnoreSignificantBits || isAddRecSExtable(AR, SE)) { in getExactSDiv()
571 const SCEV *Step = getExactSDiv(AR->getStepRecurrence(SE), RHS, SE, in getExactSDiv()
574 const SCEV *Start = getExactSDiv(AR->getStart(), RHS, SE, in getExactSDiv()
580 return SE.getAddRecExpr(Start, Step, AR->getLoop(), SCEV::FlagAnyWrap); in getExactSDiv()
636 } else if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { in ExtractImmediate() local
637 SmallVector<const SCEV *, 8> NewOps(AR->op_begin(), AR->op_end()); in ExtractImmediate()
640 S = SE.getAddRecExpr(NewOps, AR->getLoop(), in ExtractImmediate()
662 } else if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { in ExtractSymbol() local
663 SmallVector<const SCEV *, 8> NewOps(AR->op_begin(), AR->op_end()); in ExtractSymbol()
666 S = SE.getAddRecExpr(NewOps, AR->getLoop(), in ExtractSymbol()
731 static bool isExistingPhi(const SCEVAddRecExpr *AR, ScalarEvolution &SE) { in isExistingPhi() argument
732 for (BasicBlock::iterator I = AR->getLoop()->getHeader()->begin(); in isExistingPhi()
736 SE.getEffectiveSCEVType(AR->getType())) && in isExistingPhi()
737 SE.getSCEV(PN) == AR) in isExistingPhi()
804 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { in isHighCostExpansion() local
805 if (isExistingPhi(AR, SE)) in isHighCostExpansion()
929 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Reg)) { in RateRegister() local
934 if (AR->getLoop() != L) { in RateRegister()
936 if (isExistingPhi(AR, SE)) in RateRegister()
947 if (!AR->isAffine() || !isa<SCEVConstant>(AR->getOperand(1))) { in RateRegister()
948 if (!Regs.count(AR->getOperand(1))) { in RateRegister()
949 RateRegister(AR->getOperand(1), Regs, L, SE, DT); in RateRegister()
2027 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(IV); in OptimizeMax() local
2028 if (!AR || !AR->isAffine() || in OptimizeMax()
2029 AR->getStart() != One || in OptimizeMax()
2030 AR->getStepRecurrence(SE) != One) in OptimizeMax()
2033 assert(AR->getLoop() == L && in OptimizeMax()
2375 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { in CollectInterestingTypesAndFactors() local
2376 if (AR->getLoop() == L) in CollectInterestingTypesAndFactors()
2377 Strides.insert(AR->getStepRecurrence(SE)); in CollectInterestingTypesAndFactors()
2378 Worklist.push_back(AR->getStart()); in CollectInterestingTypesAndFactors()
2434 if (const SCEVAddRecExpr *AR = in findIVOperand() local
2436 if (AR->getLoop() == L) in findIVOperand()
3195 } else if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) { in CollectSubexprs() local
3197 if (AR->getStart()->isZero()) in CollectSubexprs()
3200 const SCEV *Remainder = CollectSubexprs(AR->getStart(), in CollectSubexprs()
3204 if (Remainder && (AR->getLoop() == L || !isa<SCEVAddRecExpr>(Remainder))) { in CollectSubexprs()
3208 if (Remainder != AR->getStart()) { in CollectSubexprs()
3210 Remainder = SE.getConstant(AR->getType(), 0); in CollectSubexprs()
3212 AR->getStepRecurrence(SE), in CollectSubexprs()
3213 AR->getLoop(), in CollectSubexprs()
3583 if (const SCEVAddRecExpr *AR = in GenerateScales() local
3590 if (const SCEV *Quotient = getExactSDiv(AR, FactorS, SE, true)) { in GenerateScales()