• Home
  • Raw
  • Download

Lines Matching refs:GEPI

700 static bool canReplaceGEPIdxWithZero(InstCombiner &IC, GetElementPtrInst *GEPI,  in canReplaceGEPIdxWithZero()  argument
702 if (GEPI->getNumOperands() < 2) in canReplaceGEPIdxWithZero()
707 auto FirstNZIdx = [](const GetElementPtrInst *GEPI) { in canReplaceGEPIdxWithZero() argument
709 for (unsigned IE = GEPI->getNumOperands(); I != IE; ++I) { in canReplaceGEPIdxWithZero()
710 Value *V = GEPI->getOperand(I); in canReplaceGEPIdxWithZero()
723 Idx = FirstNZIdx(GEPI); in canReplaceGEPIdxWithZero()
724 if (Idx == GEPI->getNumOperands()) in canReplaceGEPIdxWithZero()
726 if (isa<Constant>(GEPI->getOperand(Idx))) in canReplaceGEPIdxWithZero()
729 SmallVector<Value *, 4> Ops(GEPI->idx_begin(), GEPI->idx_begin() + Idx); in canReplaceGEPIdxWithZero()
731 GetElementPtrInst::getIndexedType(GEPI->getSourceElementType(), Ops); in canReplaceGEPIdxWithZero()
742 for (unsigned i = Idx+1, e = GEPI->getNumOperands(); i != e; ++i) { in canReplaceGEPIdxWithZero()
744 IC.ComputeSignBit(GEPI->getOperand(i), KnownNonNegative, in canReplaceGEPIdxWithZero()
759 if (Idx+1 != GEPI->getNumOperands() && !GEPI->isInBounds()) in canReplaceGEPIdxWithZero()
764 return isObjectSizeLessThanOrEq(GEPI->getOperand(0), TyAllocSize, DL) && in canReplaceGEPIdxWithZero()
774 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) { in replaceGEPIdxWithZero() local
776 if (canReplaceGEPIdxWithZero(IC, GEPI, &MemI, Idx)) { in replaceGEPIdxWithZero()
777 Instruction *NewGEPI = GEPI->clone(); in replaceGEPIdxWithZero()
779 ConstantInt::get(GEPI->getOperand(Idx)->getType(), 0)); in replaceGEPIdxWithZero()
780 NewGEPI->insertBefore(GEPI); in replaceGEPIdxWithZero()
848 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) { in visitLoadInst() local
849 const Value *GEPI0 = GEPI->getOperand(0); in visitLoadInst()
851 if (isa<ConstantPointerNull>(GEPI0) && GEPI->getPointerAddressSpace() == 0){ in visitLoadInst()