Lines Matching defs:GEP
391 auto *GEP = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts());
392 if (!GEP)
395 auto I = GEPIdx.find(GEP);
396 assert(I != GEPIdx.end() && "Must have entry for GEP!");
400 static Value *GEPToVectorIndex(GetElementPtrInst *GEP, AllocaInst *Alloca,
402 // TODO: Extracting a "multiple of X" from a GEP might be a useful generic
404 unsigned BW = DL.getIndexTypeSizeInBits(GEP->getType());
407 if (GEP->getPointerOperand()->stripPointerCasts() != Alloca ||
408 !GEP->collectOffset(DL, BW, VarOffsets, ConstOffset))
430 return ConstantInt::get(GEP->getContext(), Quot);
441 /// \param GEPVectorIdx GEP -> VectorIdx cache.
815 if (auto *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
816 // If we can't compute a vector index from this GEP, then we can't
818 Value *Index = GEPToVectorIndex(GEP, &Alloca, VecEltTy, *DL);
820 return RejectUser(Inst, "cannot compute vector index for GEP");
822 GEPVectorIdx[GEP] = Index;
849 GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
850 if (Ptr != &Alloca && !GEPVectorIdx.count(GEP))
1199 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) {
1202 if (!GEP->isInBounds())