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);
727 Value *Sum = 0;
732 if (!Sum) {
734 Sum = expand(Op);
736 } else if (PointerType *PTy = dyn_cast<PointerType>(Sum->getType())) {
737 // The running sum expression is a pointer. Try to form a getelementptr
749 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum);
751 // The running sum is an integer, and there's a pointer at this level.
752 // Try to form a getelementptr. If the running sum is instructions,
755 NewOps.push_back(isa<Instruction>(Sum) ? SE.getUnknown(Sum) :
756 SE.getSCEV(Sum));
759 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op));
763 Sum = InsertNoopCastOfTo(Sum, Ty);
764 Sum = InsertBinop(Instruction::Sub, Sum, W);
769 Sum = InsertNoopCastOfTo(Sum, Ty);
771 if (isa<Constant>(Sum)) std::swap(Sum, W);
772 Sum = InsertBinop(Instruction::Add, Sum, W);
777 return Sum;