Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Sum

293   const SCEV *Sum = NoAddRecs.empty() ?
297 // the sum into a single value, so just use that.
299 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Sum))
301 else if (!Sum->isZero())
302 Ops.push_back(Sum);
714 Value *Sum = 0;
719 if (!Sum) {
721 Sum = expand(Op);
723 } else if (PointerType *PTy = dyn_cast<PointerType>(Sum->getType())) {
724 // The running sum expression is a pointer. Try to form a getelementptr
736 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum);
738 // The running sum is an integer, and there's a pointer at this level.
739 // Try to form a getelementptr. If the running sum is instructions,
742 NewOps.push_back(isa<Instruction>(Sum) ? SE.getUnknown(Sum) :
743 SE.getSCEV(Sum));
746 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op));
750 Sum = InsertNoopCastOfTo(Sum, Ty);
751 Sum = InsertBinop(Instruction::Sub, Sum, W);
756 Sum = InsertNoopCastOfTo(Sum, Ty);
758 if (isa<Constant>(Sum)) std::swap(Sum, W);
759 Sum = InsertBinop(Instruction::Add, Sum, W);
764 return Sum;