Lines Matching refs:GEPI
7727 static bool tryUnmergingGEPsAcrossIndirectBr(GetElementPtrInst *GEPI, in tryUnmergingGEPsAcrossIndirectBr() argument
7729 BasicBlock *SrcBlock = GEPI->getParent(); in tryUnmergingGEPsAcrossIndirectBr()
7735 if (!GEPSequentialConstIndexed(GEPI)) in tryUnmergingGEPsAcrossIndirectBr()
7737 ConstantInt *GEPIIdx = cast<ConstantInt>(GEPI->getOperand(1)); in tryUnmergingGEPsAcrossIndirectBr()
7743 Value *GEPIOp = GEPI->getOperand(0); in tryUnmergingGEPsAcrossIndirectBr()
7752 if (find_if(GEPI->users(), [&](User *Usr) { in tryUnmergingGEPsAcrossIndirectBr()
7759 }) == GEPI->users().end()) in tryUnmergingGEPsAcrossIndirectBr()
7766 if (Usr == GEPI) continue; in tryUnmergingGEPsAcrossIndirectBr()
7808 UGEPI->setOperand(0, GEPI); in tryUnmergingGEPsAcrossIndirectBr()
7816 if (!GEPI->isInBounds()) { in tryUnmergingGEPsAcrossIndirectBr()
7988 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in optimizeInst() local
7989 if (GEPI->hasAllZeroIndices()) { in optimizeInst()
7991 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(), in optimizeInst()
7992 GEPI->getName(), GEPI); in optimizeInst()
7993 NC->setDebugLoc(GEPI->getDebugLoc()); in optimizeInst()
7994 GEPI->replaceAllUsesWith(NC); in optimizeInst()
7995 GEPI->eraseFromParent(); in optimizeInst()
8000 if (tryUnmergingGEPsAcrossIndirectBr(GEPI, TTI)) { in optimizeInst()