Lines Matching defs:GEP
142 GEP, // &B[..][i * S][..]
154 // Note that Index and Stride of a GEP candidate do not necessarily have the
217 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
238 GetElementPtrInst *GEP);
285 static bool isGEPFoldable(GetElementPtrInst *GEP,
287 SmallVector<const Value *, 4> Indices(GEP->indices());
288 return TTI->getGEPCost(GEP->getSourceElementType(), GEP->getPointerOperand(),
306 if (C.CandidateKind == Candidate::GEP)
311 // Returns true if GEP has zero or one non-zero index.
312 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) {
314 for (Use &Idx : GEP->indices()) {
331 if (C.CandidateKind == Candidate::GEP) {
488 allocateCandidatesAndFindBasis(Candidate::GEP, B, ScaledIdx, S, I);
494 GetElementPtrInst *GEP) {
498 ArrayIdx, ElementSize, GEP);
514 // GEP = Base + sext(LHS *nsw RHS) * ElementSize
515 allocateCandidatesAndFindBasisForGEP(Base, RHS, LHS, ElementSize, GEP);
517 // GEP = Base + sext(LHS <<nsw RHS) * ElementSize
522 allocateCandidatesAndFindBasisForGEP(Base, PowerOf2, LHS, ElementSize, GEP);
527 GetElementPtrInst *GEP) {
529 if (GEP->getType()->isVectorTy())
533 for (Use &Idx : GEP->indices())
536 gep_type_iterator GTI = gep_type_begin(GEP);
537 for (unsigned I = 1, E = GEP->getNumOperands(); I != E; ++I, ++GTI) {
544 // The base of this candidate is GEP's base plus the offsets of all
546 const SCEV *BaseExpr = SE->getGEPExpr(cast<GEPOperator>(GEP), IndexExprs);
547 Value *ArrayIdx = GEP->getOperand(I);
550 DL->getIndexSizeInBits(GEP->getAddressSpace())) {
553 factorArrayIndex(ArrayIdx, BaseExpr, ElementSize, GEP);
561 DL->getIndexSizeInBits(GEP->getAddressSpace())) {
564 factorArrayIndex(TruncatedArrayIdx, BaseExpr, ElementSize, GEP);
661 case Candidate::GEP: {