Lines Matching defs:Cond

52                         ConditionInfo &Cond, const Loop &L) {
53 Cond.ICmp = ICmp;
54 if (match(ICmp, m_ICmp(Cond.Pred, m_Value(Cond.AddRecValue),
55 m_Value(Cond.BoundValue)))) {
56 const SCEV *AddRecSCEV = SE.getSCEV(Cond.AddRecValue);
57 const SCEV *BoundSCEV = SE.getSCEV(Cond.BoundValue);
62 std::swap(Cond.AddRecValue, Cond.BoundValue);
64 Cond.Pred = ICmpInst::getSwappedPredicate(Cond.Pred);
67 Cond.AddRecSCEV = dyn_cast<SCEVAddRecExpr>(AddRecSCEV);
68 Cond.BoundSCEV = BoundSCEV;
69 Cond.NonPHIAddRecValue = Cond.AddRecValue;
71 // If the Cond.AddRecValue is PHI node, update Cond.NonPHIAddRecValue with
73 if (Cond.AddRecSCEV && isa<PHINode>(Cond.AddRecValue)) {
74 PHINode *PN = cast<PHINode>(Cond.AddRecValue);
75 Cond.NonPHIAddRecValue = PN->getIncomingValueForBlock(L.getLoopLatch());
81 ConditionInfo &Cond, bool IsExitCond) {
83 const SCEV *ExitCount = SE.getExitCount(&L, Cond.ICmp->getParent());
87 Cond.BoundSCEV = ExitCount;
92 if (Cond.Pred == ICmpInst::ICMP_SLT || Cond.Pred == ICmpInst::ICMP_ULT)
98 if (Cond.Pred != ICmpInst::ICMP_ULE && Cond.Pred != ICmpInst::ICMP_SLE)
102 dyn_cast<IntegerType>(Cond.BoundSCEV->getType())) {
104 APInt Max = ICmpInst::isSigned(Cond.Pred)
110 ICmpInst::isSigned(Cond.Pred) ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT;
111 if (SE.isKnownPredicate(Pred, Cond.BoundSCEV, MaxSCEV)) {
113 SE.getAddExpr(Cond.BoundSCEV, SE.getOne(BoundSCEVIntType));
114 Cond.BoundSCEV = BoundPlusOneSCEV;
115 Cond.Pred = Pred;
126 ICmpInst *ICmp, ConditionInfo &Cond,
128 analyzeICmp(SE, ICmp, Cond, L);
131 if (!SE.isAvailableAtLoopEntry(Cond.BoundSCEV, &L))
135 if (!Cond.AddRecSCEV)
138 if (!Cond.AddRecSCEV->isAffine())
141 const SCEV *StepRecSCEV = Cond.AddRecSCEV->getStepRecurrence(SE);
153 if (!calculateUpperBound(L, SE, Cond, IsExitCond))
179 ScalarEvolution &SE, ConditionInfo &Cond) {
215 if (!hasProcessableCondition(L, SE, ICmp, Cond, /*IsExitCond*/ true))
218 Cond.BI = ExitingBI;
394 Value *Cond =
396 Builder.CreateCondBr(Cond, PostLoop->getHeader(), PostLoop->getExitBlock());