Lines Matching defs:GEPI
891 GetElementPtrInst *GEPI, Instruction *MemI,
893 if (GEPI->getNumOperands() < 2)
898 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) {
900 for (unsigned IE = GEPI->getNumOperands(); I != IE; ++I) {
901 Value *V = GEPI->getOperand(I);
914 Idx = FirstNZIdx(GEPI);
915 if (Idx == GEPI->getNumOperands())
917 if (isa<Constant>(GEPI->getOperand(Idx)))
920 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx);
921 Type *SourceElementType = GEPI->getSourceElementType();
938 for (unsigned i = Idx+1, e = GEPI->getNumOperands(); i != e; ++i) {
939 KnownBits Known = IC.computeKnownBits(GEPI->getOperand(i), 0, MemI);
953 if (Idx+1 != GEPI->getNumOperands() && !GEPI->isInBounds())
958 return isObjectSizeLessThanOrEq(GEPI->getOperand(0), TyAllocSize, DL) &&
967 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) {
969 if (canReplaceGEPIdxWithZero(IC, GEPI, &MemI, Idx)) {
970 Instruction *NewGEPI = GEPI->clone();
972 ConstantInt::get(GEPI->getOperand(Idx)->getType(), 0));
973 IC.InsertNewInstBefore(NewGEPI, GEPI->getIterator());
986 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr))
987 Ptr = GEPI->getOperand(0);
993 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
994 const Value *GEPI0 = GEPI->getOperand(0);
996 !NullPointerIsDefined(LI.getFunction(), GEPI->getPointerAddressSpace()))