Lines Matching refs:SE

49     ScalarEvolution  *SE;
57 SimplifyIndvar(Loop *Loop, ScalarEvolution *SE, DominatorTree *DT,
59 : L(Loop), LI(LI), SE(SE), DT(DT), DeadInsts(Dead), Changed(false) {
116 assert(SE->isSCEVable(IVSrc->getType()) && "Expect SCEVable IV operand");
128 FoldedExpr = SE->getUDivExpr(SE->getSCEV(IVSrc), SE->getSCEV(D));
131 if (!SE->isSCEVable(UseInst->getType()))
135 if (SE->getSCEV(UseInst) != FoldedExpr)
142 assert(SE->getSCEV(UseInst) == FoldedExpr && "bad SCEV with folded oper");
164 const SCEV *S = SE->getSCEV(ICmp->getOperand(IVOperIdx));
165 const SCEV *X = SE->getSCEV(ICmp->getOperand(1 - IVOperIdx));
169 S = SE->getSCEVAtScope(S, ICmpLoop);
170 X = SE->getSCEVAtScope(X, ICmpLoop);
177 if (SE->isKnownPredicate(Pred, S, X)) {
181 } else if (SE->isKnownPredicate(ICmpInst::getInversePredicate(Pred), S, X)) {
186 SE->isLoopInvariantPredicate(Pred, S, X, ICmpLoop,
208 const SCEV *IncomingS = SE->getSCEV(Incoming);
244 const SCEV *S = SE->getSCEV(Rem->getOperand(0));
245 const SCEV *X = SE->getSCEV(Rem->getOperand(1));
249 S = SE->getSCEVAtScope(S, ICmpLoop);
250 X = SE->getSCEVAtScope(X, ICmpLoop);
253 if ((!IsSigned || SE->isKnownNonNegative(S)) &&
254 SE->isKnownPredicate(IsSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT,
259 const SCEV *LessOne = SE->getMinusSCEV(S, SE->getOne(S->getType()));
260 if (IsSigned && !SE->isKnownNonNegative(LessOne))
263 if (!SE->isKnownPredicate(IsSigned ?
309 if (!SE->isSCEVable(UseInst->getType()) ||
311 (SE->getSCEV(UseInst) != SE->getSCEV(IVOperand)))
379 const SCEV *LHS = SE->getSCEV(BO->getOperand(0));
380 const SCEV *RHS = SE->getSCEV(BO->getOperand(1));
385 const SCEV *ExtendAfterOp = SE->getZeroExtendExpr(SE->getSCEV(BO), WideTy);
386 const SCEV *OpAfterExtend = (SE->*GetExprForBO)(
387 SE->getZeroExtendExpr(LHS, WideTy), SE->getZeroExtendExpr(RHS, WideTy),
391 SE->forgetValue(BO);
397 const SCEV *ExtendAfterOp = SE->getSignExtendExpr(SE->getSCEV(BO), WideTy);
398 const SCEV *OpAfterExtend = (SE->*GetExprForBO)(
399 SE->getSignExtendExpr(LHS, WideTy), SE->getSignExtendExpr(RHS, WideTy),
403 SE->forgetValue(BO);
498 static bool isSimpleIVUser(Instruction *I, const Loop *L, ScalarEvolution *SE) {
499 if (!SE->isSCEVable(I->getType()))
503 const SCEV *S = SE->getSCEV(I);
526 if (!SE->isSCEVable(CurrIV->getType()))
585 if (isSimpleIVUser(UseOper.first, L, SE)) {
597 bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, DominatorTree *DT,
600 SimplifyIndvar SIV(LI->getLoopFor(CurrIV->getParent()), SE, DT, LI, Dead);
607 bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT,
611 Changed |= simplifyUsersOfIV(cast<PHINode>(I), SE, DT, LI, Dead);