Lines Matching refs:AR
157 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(this); in print() local
158 OS << "{" << *AR->getOperand(0); in print()
159 for (unsigned i = 1, e = AR->getNumOperands(); i != e; ++i) in print()
160 OS << ",+," << *AR->getOperand(i); in print()
162 if (AR->getNoWrapFlags(FlagNUW)) in print()
164 if (AR->getNoWrapFlags(FlagNSW)) in print()
166 if (AR->getNoWrapFlags(FlagNW) && in print()
167 !AR->getNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW))) in print()
169 WriteAsOperand(OS, AR->getLoop()->getHeader(), /*PrintType=*/false); in print()
942 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op)) in getZeroExtendExpr() local
943 if (AR->isAffine()) { in getZeroExtendExpr()
944 const SCEV *Start = AR->getStart(); in getZeroExtendExpr()
945 const SCEV *Step = AR->getStepRecurrence(*this); in getZeroExtendExpr()
946 unsigned BitWidth = getTypeSizeInBits(AR->getType()); in getZeroExtendExpr()
947 const Loop *L = AR->getLoop(); in getZeroExtendExpr()
951 if (AR->getNoWrapFlags(SCEV::FlagNUW)) in getZeroExtendExpr()
954 L, AR->getNoWrapFlags()); in getZeroExtendExpr()
986 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNUW); in getZeroExtendExpr()
990 L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1003 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW); in getZeroExtendExpr()
1007 L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1018 if (isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_ULT, AR, N) || in getZeroExtendExpr()
1021 AR->getPostIncExpr(*this), N))) { in getZeroExtendExpr()
1023 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNUW); in getZeroExtendExpr()
1027 L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1032 if (isLoopBackedgeGuardedByCond(L, ICmpInst::ICMP_UGT, AR, N) || in getZeroExtendExpr()
1035 AR->getPostIncExpr(*this), N))) { in getZeroExtendExpr()
1038 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNW); in getZeroExtendExpr()
1042 L, AR->getNoWrapFlags()); in getZeroExtendExpr()
1083 static const SCEV *getPreStartForSignExtend(const SCEVAddRecExpr *AR, in getPreStartForSignExtend() argument
1086 const Loop *L = AR->getLoop(); in getPreStartForSignExtend()
1087 const SCEV *Start = AR->getStart(); in getPreStartForSignExtend()
1088 const SCEV *Step = AR->getStepRecurrence(*SE); in getPreStartForSignExtend()
1119 unsigned BitWidth = SE->getTypeSizeInBits(AR->getType()); in getPreStartForSignExtend()
1145 static const SCEV *getSignExtendAddRecStart(const SCEVAddRecExpr *AR, in getSignExtendAddRecStart() argument
1148 const SCEV *PreStart = getPreStartForSignExtend(AR, Ty, SE); in getSignExtendAddRecStart()
1150 return SE->getSignExtendExpr(AR->getStart(), Ty); in getSignExtendAddRecStart()
1152 return SE->getAddExpr(SE->getSignExtendExpr(AR->getStepRecurrence(*SE), Ty), in getSignExtendAddRecStart()
1208 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op)) in getSignExtendExpr() local
1209 if (AR->isAffine()) { in getSignExtendExpr()
1210 const SCEV *Start = AR->getStart(); in getSignExtendExpr()
1211 const SCEV *Step = AR->getStepRecurrence(*this); in getSignExtendExpr()
1212 unsigned BitWidth = getTypeSizeInBits(AR->getType()); in getSignExtendExpr()
1213 const Loop *L = AR->getLoop(); in getSignExtendExpr()
1217 if (AR->getNoWrapFlags(SCEV::FlagNSW)) in getSignExtendExpr()
1218 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this), in getSignExtendExpr()
1252 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNSW); in getSignExtendExpr()
1254 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this), in getSignExtendExpr()
1256 L, AR->getNoWrapFlags()); in getSignExtendExpr()
1268 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNSW); in getSignExtendExpr()
1270 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this), in getSignExtendExpr()
1272 L, AR->getNoWrapFlags()); in getSignExtendExpr()
1283 (isLoopBackedgeGuardedByCond(L, Pred, AR, OverflowLimit) || in getSignExtendExpr()
1285 isLoopBackedgeGuardedByCond(L, Pred, AR->getPostIncExpr(*this), in getSignExtendExpr()
1288 const_cast<SCEVAddRecExpr *>(AR)->setNoWrapFlags(SCEV::FlagNSW); in getSignExtendExpr()
1289 return getAddRecExpr(getSignExtendAddRecStart(AR, Ty, this), in getSignExtendExpr()
1291 L, AR->getNoWrapFlags()); in getSignExtendExpr()
1340 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(Op)) { in getAnyExtendExpr() local
1342 for (SCEVAddRecExpr::op_iterator I = AR->op_begin(), E = AR->op_end(); in getAnyExtendExpr()
1345 return getAddRecExpr(Ops, AR->getLoop(), SCEV::FlagNW); in getAnyExtendExpr()
2151 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LHS)) in getUDivExpr() local
2153 dyn_cast<SCEVConstant>(AR->getStepRecurrence(*this))) { in getUDivExpr()
2158 getZeroExtendExpr(AR, ExtTy) == in getUDivExpr()
2159 getAddRecExpr(getZeroExtendExpr(AR->getStart(), ExtTy), in getUDivExpr()
2161 AR->getLoop(), SCEV::FlagAnyWrap)) { in getUDivExpr()
2163 for (unsigned i = 0, e = AR->getNumOperands(); i != e; ++i) in getUDivExpr()
2164 Operands.push_back(getUDivExpr(AR->getOperand(i), RHS)); in getUDivExpr()
2165 return getAddRecExpr(Operands, AR->getLoop(), in getUDivExpr()
2171 const SCEVConstant *StartC = dyn_cast<SCEVConstant>(AR->getStart()); in getUDivExpr()
2173 getZeroExtendExpr(AR, ExtTy) == in getUDivExpr()
2174 getAddRecExpr(getZeroExtendExpr(AR->getStart(), ExtTy), in getUDivExpr()
2176 AR->getLoop(), SCEV::FlagAnyWrap)) { in getUDivExpr()
2181 AR->getLoop(), SCEV::FlagNW); in getUDivExpr()
5628 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(RHS)) { in SimplifyICmpOperands() local
5629 const Loop *L = AR->getLoop(); in SimplifyICmpOperands()
5888 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(LHS)) in isKnownPredicate() local
5890 AR->getLoop(), Pred, AR->getStart(), RHS) && in isKnownPredicate()
5892 AR->getLoop(), Pred, AR->getPostIncExpr(*this), RHS)) in isKnownPredicate()
5894 if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(RHS)) in isKnownPredicate() local
5896 AR->getLoop(), Pred, LHS, AR->getStart()) && in isKnownPredicate()
5898 AR->getLoop(), Pred, LHS, AR->getPostIncExpr(*this))) in isKnownPredicate()
6701 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S); in computeLoopDisposition() local
6704 if (AR->getLoop() == L) in computeLoopDisposition()
6712 if (L->contains(AR->getLoop())) in computeLoopDisposition()
6716 if (AR->getLoop()->contains(L)) in computeLoopDisposition()
6721 for (SCEVAddRecExpr::op_iterator I = AR->op_begin(), E = AR->op_end(); in computeLoopDisposition()
6804 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S); in computeBlockDisposition() local
6805 if (!DT->dominates(AR->getLoop()->getHeader(), BB)) in computeBlockDisposition()