Lines Matching refs:AR

160     const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(this);  in print()  local
161 OS << "{" << *AR->getOperand(0); in print()
162 for (unsigned i = 1, e = AR->getNumOperands(); i != e; ++i) in print()
163 OS << ",+," << *AR->getOperand(i); in print()
165 if (AR->getNoWrapFlags(FlagNUW)) in print()
167 if (AR->getNoWrapFlags(FlagNSW)) in print()
169 if (AR->getNoWrapFlags(FlagNW) && in print()
170 !AR->getNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW))) in print()
172 AR->getLoop()->getHeader()->printAsOperand(OS, /*PrintType=*/false); in print()
1240 static const SCEV *getPreStartForExtend(const SCEVAddRecExpr *AR, Type *Ty, in getPreStartForExtend() argument
1245 const Loop *L = AR->getLoop(); in getPreStartForExtend()
1246 const SCEV *Start = AR->getStart(); in getPreStartForExtend()
1247 const SCEV *Step = AR->getStepRecurrence(*SE); in getPreStartForExtend()
1285 unsigned BitWidth = SE->getTypeSizeInBits(AR->getType()); in getPreStartForExtend()
1291 if (PreAR && AR->getNoWrapFlags(WrapType)) { in getPreStartForExtend()
1314 static const SCEV *getExtendAddRecStart(const SCEVAddRecExpr *AR, Type *Ty, in getExtendAddRecStart() argument
1318 const SCEV *PreStart = getPreStartForExtend<ExtendOpTy>(AR, Ty, SE); in getExtendAddRecStart()
1320 return (SE->*GetExtendExpr)(AR->getStart(), Ty); in getExtendAddRecStart()
1322 return SE->getAddExpr((SE->*GetExtendExpr)(AR->getStepRecurrence(*SE), Ty), in getExtendAddRecStart()
1446 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op)) in getZeroExtendExpr() local
1447 if (AR->isAffine()) { in getZeroExtendExpr()
1448 const SCEV *Start = AR->getStart(); in getZeroExtendExpr()
1449 const SCEV *Step = AR->getStepRecurrence(*this); in getZeroExtendExpr()
1450 unsigned BitWidth = getTypeSizeInBits(AR->getType()); in getZeroExtendExpr()
1451 const Loop *L = AR->getLoop(); in getZeroExtendExpr()
1455 if (AR->getNoWrapFlags(SCEV::FlagNUW)) in getZeroExtendExpr()
1457 getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this), in getZeroExtendExpr()
1458 getZeroExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1493 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNUW); in getZeroExtendExpr()
1496 getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this), in getZeroExtendExpr()
1497 getZeroExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1508 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW); in getZeroExtendExpr()
1511 getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this), in getZeroExtendExpr()
1512 getSignExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1523 if (isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_ULT, AR, N) || in getZeroExtendExpr()
1526 AR->getPostIncExpr(*this), N))) { in getZeroExtendExpr()
1528 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNUW); in getZeroExtendExpr()
1531 getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this), in getZeroExtendExpr()
1532 getZeroExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1537 if (isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_UGT, AR, N) || in getZeroExtendExpr()
1540 AR->getPostIncExpr(*this), N))) { in getZeroExtendExpr()
1543 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW); in getZeroExtendExpr()
1546 getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this), in getZeroExtendExpr()
1547 getSignExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1553 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNUW); in getZeroExtendExpr()
1555 getExtendAddRecStart<SCEVZeroExtendExpr>(AR, Ty, this), in getZeroExtendExpr()
1556 getZeroExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1659 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op)) in getSignExtendExpr() local
1660 if (AR->isAffine()) { in getSignExtendExpr()
1661 const SCEV *Start = AR->getStart(); in getSignExtendExpr()
1662 const SCEV *Step = AR->getStepRecurrence(*this); in getSignExtendExpr()
1663 unsigned BitWidth = getTypeSizeInBits(AR->getType()); in getSignExtendExpr()
1664 const Loop *L = AR->getLoop(); in getSignExtendExpr()
1668 if (AR->getNoWrapFlags(SCEV::FlagNSW)) in getSignExtendExpr()
1670 getExtendAddRecStart<SCEVSignExtendExpr>(AR, Ty, this), in getSignExtendExpr()
1706 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNSW); in getSignExtendExpr()
1709 getExtendAddRecStart<SCEVSignExtendExpr>(AR, Ty, this), in getSignExtendExpr()
1710 getSignExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getSignExtendExpr()
1727 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW); in getSignExtendExpr()
1731 getExtendAddRecStart<SCEVSignExtendExpr>(AR, Ty, this), in getSignExtendExpr()
1732 getZeroExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getSignExtendExpr()
1744 (isLoopBackedgeGuardedByCond(L, Pred, AR, OverflowLimit) || in getSignExtendExpr()
1746 isLoopBackedgeGuardedByCond(L, Pred, AR->getPostIncExpr(*this), in getSignExtendExpr()
1749 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNSW); in getSignExtendExpr()
1751 getExtendAddRecStart<SCEVSignExtendExpr>(AR, Ty, this), in getSignExtendExpr()
1752 getSignExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getSignExtendExpr()
1766 const SCEV *NewAR = getAddRecExpr(getZero(AR->getType()), Step, L, in getSignExtendExpr()
1767 AR->getNoWrapFlags()); in getSignExtendExpr()
1773 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNSW); in getSignExtendExpr()
1775 getExtendAddRecStart<SCEVSignExtendExpr>(AR, Ty, this), in getSignExtendExpr()
1776 getSignExtendExpr(Step, Ty), L, AR->getNoWrapFlags()); in getSignExtendExpr()
1824 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op)) { in getAnyExtendExpr() local
1826 for (const SCEV *Op : AR->operands()) in getAnyExtendExpr()
1828 return getAddRecExpr(Ops, AR->getLoop(), SCEV::FlagNW); in getAnyExtendExpr()
2662 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LHS)) in getUDivExpr() local
2664 dyn_cast<SCEVConstant>(AR->getStepRecurrence(*this))) { in getUDivExpr()
2669 getZeroExtendExpr(AR, ExtTy) == in getUDivExpr()
2670 getAddRecExpr(getZeroExtendExpr(AR->getStart(), ExtTy), in getUDivExpr()
2672 AR->getLoop(), SCEV::FlagAnyWrap)) { in getUDivExpr()
2674 for (const SCEV *Op : AR->operands()) in getUDivExpr()
2676 return getAddRecExpr(Operands, AR->getLoop(), SCEV::FlagNW); in getUDivExpr()
2681 const SCEVConstant *StartC = dyn_cast<SCEVConstant>(AR->getStart()); in getUDivExpr()
2683 getZeroExtendExpr(AR, ExtTy) == in getUDivExpr()
2684 getAddRecExpr(getZeroExtendExpr(AR->getStart(), ExtTy), in getUDivExpr()
2686 AR->getLoop(), SCEV::FlagAnyWrap)) { in getUDivExpr()
2691 AR->getLoop(), SCEV::FlagNW); in getUDivExpr()
6827 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(RHS)) { in SimplifyICmpOperands() local
6828 const Loop *L = AR->getLoop(); in SimplifyICmpOperands()
8526 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) in follow() local
8527 Strides.push_back(AR->getStepRecurrence(SE)); in follow()
8863 if (auto *AR = dyn_cast<SCEVAddRecExpr>(Expr)) in computeAccessFunctions() local
8864 if (!AR->isAffine()) in computeAccessFunctions()
9225 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S); in computeLoopDisposition() local
9228 if (AR->getLoop() == L) in computeLoopDisposition()
9236 if (L->contains(AR->getLoop())) in computeLoopDisposition()
9240 if (AR->getLoop()->contains(L)) in computeLoopDisposition()
9245 for (auto *Op : AR->operands()) in computeLoopDisposition()
9332 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S); in computeBlockDisposition() local
9333 if (!DT.dominates(AR->getLoop()->getHeader(), BB)) in computeBlockDisposition()