Lines Matching defs:GEP
217 // Matches the pattern ptr+i*M+j, with the two additions being done via GEP.
662 auto CheckGEP = [&](GetElementPtrInst *GEP, Value *GEPOperand) {
663 for (Value *GEPUser : GEP->users()) {
666 !(isa<StoreInst>(GEPUserInst) && GEP == GEPUserInst->getOperand(1)))
670 // The IV is used as the operand of a GEP which dominates the loop
672 // GEP. In this case, the GEP would wrap around the address space
674 if (GEP->isInBounds() &&
676 DL.getPointerTypeSizeInBits(GEP->getType())) {
679 GEP->dump());
686 // Check if any IV user is, or is used by, a GEP that would cause UB if the
689 if (auto *GEP = dyn_cast<GetElementPtrInst>(V))
690 if (GEP->getNumIndices() == 1 && CheckGEP(GEP, GEP->getOperand(1)))
693 if (auto *GEP = dyn_cast<GetElementPtrInst>(U))
694 if (CheckGEP(GEP, V))
805 if (auto *GEP = dyn_cast<GetElementPtrInst>(V)) {
806 // Replace the GEP with one that uses OuterValue as the offset.
807 auto *InnerGEP = cast<GetElementPtrInst>(GEP->getOperand(0));
809 // When the base of the GEP doesn't dominate the outer induction phi then
810 // we need to insert the new GEP where the old GEP was.
814 Builder.CreateGEP(GEP->getSourceElementType(), Base, OuterValue,
816 GEP->isInBounds() && InnerGEP->isInBounds());