Lines Matching refs:GEPI
6557 static bool tryUnmergingGEPsAcrossIndirectBr(GetElementPtrInst *GEPI, in tryUnmergingGEPsAcrossIndirectBr() argument
6559 BasicBlock *SrcBlock = GEPI->getParent(); in tryUnmergingGEPsAcrossIndirectBr()
6565 if (!GEPSequentialConstIndexed(GEPI)) in tryUnmergingGEPsAcrossIndirectBr()
6567 ConstantInt *GEPIIdx = cast<ConstantInt>(GEPI->getOperand(1)); in tryUnmergingGEPsAcrossIndirectBr()
6572 Value *GEPIOp = GEPI->getOperand(0); in tryUnmergingGEPsAcrossIndirectBr()
6581 if (find_if(GEPI->users(), [&](User *Usr) { in tryUnmergingGEPsAcrossIndirectBr()
6588 }) == GEPI->users().end()) in tryUnmergingGEPsAcrossIndirectBr()
6595 if (Usr == GEPI) continue; in tryUnmergingGEPsAcrossIndirectBr()
6635 UGEPI->setOperand(0, GEPI); in tryUnmergingGEPsAcrossIndirectBr()
6643 if (!GEPI->isInBounds()) { in tryUnmergingGEPsAcrossIndirectBr()
6757 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) { in optimizeInst() local
6758 if (GEPI->hasAllZeroIndices()) { in optimizeInst()
6760 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(), in optimizeInst()
6761 GEPI->getName(), GEPI); in optimizeInst()
6762 NC->setDebugLoc(GEPI->getDebugLoc()); in optimizeInst()
6763 GEPI->replaceAllUsesWith(NC); in optimizeInst()
6764 GEPI->eraseFromParent(); in optimizeInst()
6769 if (tryUnmergingGEPsAcrossIndirectBr(GEPI, TTI)) { in optimizeInst()