Lines Matching refs:GEPI

892                                      GetElementPtrInst *GEPI, Instruction *MemI,  in canReplaceGEPIdxWithZero()  argument
894 if (GEPI->getNumOperands() < 2) in canReplaceGEPIdxWithZero()
899 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero() argument
901 for (unsigned IE = GEPI->getNumOperands(); I != IE; ++I) { in canReplaceGEPIdxWithZero()
902 Value *V = GEPI->getOperand(I); in canReplaceGEPIdxWithZero()
915 Idx = FirstNZIdx(GEPI); in canReplaceGEPIdxWithZero()
916 if (Idx == GEPI->getNumOperands()) in canReplaceGEPIdxWithZero()
918 if (isa<Constant>(GEPI->getOperand(Idx))) in canReplaceGEPIdxWithZero()
921 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx); in canReplaceGEPIdxWithZero()
922 Type *SourceElementType = GEPI->getSourceElementType(); in canReplaceGEPIdxWithZero()
939 for (unsigned i = Idx+1, e = GEPI->getNumOperands(); i != e; ++i) { in canReplaceGEPIdxWithZero()
940 KnownBits Known = IC.computeKnownBits(GEPI->getOperand(i), 0, MemI); in canReplaceGEPIdxWithZero()
954 if (Idx+1 != GEPI->getNumOperands() && !GEPI->isInBounds()) in canReplaceGEPIdxWithZero()
959 return isObjectSizeLessThanOrEq(GEPI->getOperand(0), TyAllocSize, DL) && in canReplaceGEPIdxWithZero()
968 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero() local
970 if (canReplaceGEPIdxWithZero(IC, GEPI, &MemI, Idx)) { in replaceGEPIdxWithZero()
971 Instruction *NewGEPI = GEPI->clone(); in replaceGEPIdxWithZero()
973 ConstantInt::get(GEPI->getOperand(Idx)->getType(), 0)); in replaceGEPIdxWithZero()
974 IC.InsertNewInstBefore(NewGEPI, GEPI->getIterator()); in replaceGEPIdxWithZero()
987 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) in canSimplifyNullStoreOrGEP() local
988 Ptr = GEPI->getOperand(0); in canSimplifyNullStoreOrGEP()
994 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) { in canSimplifyNullLoadOrGEP() local
995 const Value *GEPI0 = GEPI->getOperand(0); in canSimplifyNullLoadOrGEP()
997 !NullPointerIsDefined(LI.getFunction(), GEPI->getPointerAddressSpace())) in canSimplifyNullLoadOrGEP()