Lines Matching defs:GEP
94 if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
95 // If the GEP has all zero indices, it doesn't offset the pointer. If it
97 Worklist.emplace_back(I, IsOffset || !GEP->hasAllZeroIndices());
246 // the new pointer. If during the chasing it sees bitcast or GEP, it will
247 // create new bitcast or GEP with the new pointer and use them in the load
386 } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
387 auto *V = getReplacement(GEP->getPointerOperand());
389 SmallVector<Value *, 8> Indices(GEP->indices());
391 GetElementPtrInst::Create(GEP->getSourceElementType(), V, Indices);
392 IC.InsertNewInstWith(NewI, GEP->getIterator());
393 NewI->takeName(GEP);
394 NewI->setNoWrapFlags(GEP->getNoWrapFlags());
395 WorkMap[GEP] = NewI;
884 // Then we know that we can replace %x in the GEP with i64 0.
886 // FIXME: We could fold any GEP index to zero that would cause UB if it were
896 // Find the first non-zero index of a GEP. If all indices are zero, return
948 // FIXME: If the GEP is not inbounds, and there are extra indices after the
964 // will always be zero. If we replace the GEP, return it.
1023 // Replace GEP indices if possible.
1375 // Replace GEP indices if possible.
1388 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr)) {
1389 if (isa<AllocaInst>(GEP->getOperand(0))) {
1390 if (GEP->getOperand(0)->hasOneUse())
1453 // store X, GEP(null, Y) -> turns into 'unreachable' in SimplifyCFG