Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Sum

315   const SCEV *Sum = NoAddRecs.empty() ?
319 // the sum into a single value, so just use that.
321 if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(Sum))
323 else if (!Sum->isZero())
324 Ops.push_back(Sum);
720 Value *Sum = nullptr;
725 if (!Sum) {
727 Sum = expand(Op);
729 } else if (PointerType *PTy = dyn_cast<PointerType>(Sum->getType())) {
730 // The running sum expression is a pointer. Try to form a getelementptr
742 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, Sum);
744 // The running sum is an integer, and there's a pointer at this level.
745 // Try to form a getelementptr. If the running sum is instructions,
748 NewOps.push_back(isa<Instruction>(Sum) ? SE.getUnknown(Sum) :
749 SE.getSCEV(Sum));
752 Sum = expandAddToGEP(NewOps.begin(), NewOps.end(), PTy, Ty, expand(Op));
756 Sum = InsertNoopCastOfTo(Sum, Ty);
757 Sum = InsertBinop(Instruction::Sub, Sum, W);
762 Sum = InsertNoopCastOfTo(Sum, Ty);
764 if (isa<Constant>(Sum)) std::swap(Sum, W);
765 Sum = InsertBinop(Instruction::Add, Sum, W);
770 return Sum;