Lines Matching defs:GEP
138 GEP, // &B[..][i * S][..]
150 // Note that Index and Stride of a GEP candidate do not necessarily have the
213 void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
234 GetElementPtrInst *GEP);
281 static bool isGEPFoldable(GetElementPtrInst *GEP,
283 SmallVector<const Value *, 4> Indices(GEP->indices());
284 return TTI->getGEPCost(GEP->getSourceElementType(), GEP->getPointerOperand(),
302 if (C.CandidateKind == Candidate::GEP)
307 // Returns true if GEP has zero or one non-zero index.
308 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) {
310 for (Use &Idx : GEP->indices()) {
327 if (C.CandidateKind == Candidate::GEP) {
484 allocateCandidatesAndFindBasis(Candidate::GEP, B, ScaledIdx, S, I);
490 GetElementPtrInst *GEP) {
494 ArrayIdx, ElementSize, GEP);
510 // GEP = Base + sext(LHS *nsw RHS) * ElementSize
511 allocateCandidatesAndFindBasisForGEP(Base, RHS, LHS, ElementSize, GEP);
513 // GEP = Base + sext(LHS <<nsw RHS) * ElementSize
518 allocateCandidatesAndFindBasisForGEP(Base, PowerOf2, LHS, ElementSize, GEP);
523 GetElementPtrInst *GEP) {
525 if (GEP->getType()->isVectorTy())
529 for (Use &Idx : GEP->indices())
532 gep_type_iterator GTI = gep_type_begin(GEP);
533 for (unsigned I = 1, E = GEP->getNumOperands(); I != E; ++I, ++GTI) {
540 // The base of this candidate is GEP's base plus the offsets of all
542 const SCEV *BaseExpr = SE->getGEPExpr(cast<GEPOperator>(GEP), IndexExprs);
543 Value *ArrayIdx = GEP->getOperand(I);
546 DL->getIndexSizeInBits(GEP->getAddressSpace())) {
549 factorArrayIndex(ArrayIdx, BaseExpr, ElementSize, GEP);
557 DL->getIndexSizeInBits(GEP->getAddressSpace())) {
560 factorArrayIndex(TruncatedArrayIdx, BaseExpr, ElementSize, GEP);
654 case Candidate::GEP: {