Lines Matching defs:GEPI
870 GetElementPtrInst *GEPI, Instruction *MemI,
872 if (GEPI->getNumOperands() < 2)
877 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) {
879 for (unsigned IE = GEPI->getNumOperands(); I != IE; ++I) {
880 Value *V = GEPI->getOperand(I);
893 Idx = FirstNZIdx(GEPI);
894 if (Idx == GEPI->getNumOperands())
896 if (isa<Constant>(GEPI->getOperand(Idx)))
899 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx);
900 Type *SourceElementType = GEPI->getSourceElementType();
917 for (unsigned i = Idx+1, e = GEPI->getNumOperands(); i != e; ++i) {
918 KnownBits Known = IC.computeKnownBits(GEPI->getOperand(i), 0, MemI);
932 if (Idx+1 != GEPI->getNumOperands() && !GEPI->isInBounds())
937 return isObjectSizeLessThanOrEq(GEPI->getOperand(0), TyAllocSize, DL) &&
946 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) {
948 if (canReplaceGEPIdxWithZero(IC, GEPI, &MemI, Idx)) {
949 Instruction *NewGEPI = GEPI->clone();
951 ConstantInt::get(GEPI->getOperand(Idx)->getType(), 0));
952 IC.InsertNewInstBefore(NewGEPI, GEPI->getIterator());
965 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr))
966 Ptr = GEPI->getOperand(0);
972 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
973 const Value *GEPI0 = GEPI->getOperand(0);
975 !NullPointerIsDefined(LI.getFunction(), GEPI->getPointerAddressSpace()))