Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Sum

319   const SCEV *Sum = NoAddRecs.empty() ?
323 // the sum into a single value, so just use that.
325 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Sum))
327 else if (!Sum->isZero())
328 Ops.push_back(Sum);
728 Value *Sum = 0;
733 if (!Sum) {
735 Sum = expand(Op);
737 } else if (PointerType *PTy = dyn_cast<PointerType>(Sum->getType())) {
738 // The running sum expression is a pointer. Try to form a getelementptr
750 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum);
752 // The running sum is an integer, and there's a pointer at this level.
753 // Try to form a getelementptr. If the running sum is instructions,
756 NewOps.push_back(isa<Instruction>(Sum) ? SE.getUnknown(Sum) :
757 SE.getSCEV(Sum));
760 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op));
764 Sum = InsertNoopCastOfTo(Sum, Ty);
765 Sum = InsertBinop(Instruction::Sub, Sum, W);
770 Sum = InsertNoopCastOfTo(Sum, Ty);
772 if (isa<Constant>(Sum)) std::swap(Sum, W);
773 Sum = InsertBinop(Instruction::Add, Sum, W);
778 return Sum;