Lines Matching defs:GEPI
8075 // For example, unmerge %GEPI and %UGEPI as below.
8082 // %GEPI = gep %GEPIOp, Idx
8085 // (* %GEPI is alive on the indirectbr edges due to other uses ahead)
8102 // (* %GEPI is still alive on the indirectbr edges)
8109 // %UGEPI = gep %GEPI, (UIdx-Idx)
8122 // (the path from %GEPIOp to %UGEPI would go through %GEPI), which is a tradeoff
8127 static bool tryUnmergingGEPsAcrossIndirectBr(GetElementPtrInst *GEPI,
8129 BasicBlock *SrcBlock = GEPI->getParent();
8134 // Check that GEPI is a simple gep with a single constant index.
8135 if (!GEPSequentialConstIndexed(GEPI))
8137 ConstantInt *GEPIIdx = cast<ConstantInt>(GEPI->getOperand(1));
8138 // Check that GEPI is a cheap one.
8143 Value *GEPIOp = GEPI->getOperand(0);
8152 if (llvm::none_of(GEPI->users(), [&](User *Usr) {
8166 if (Usr == GEPI)
8186 if (UGEPI->getSourceElementType() != GEPI->getSourceElementType())
8209 // Now unmerge between GEPI and UGEPIs.
8211 UGEPI->setOperand(0, GEPI);
8216 // If GEPI is not inbounds but UGEPI is inbounds, change UGEPI to not
8218 if (!GEPI->isInBounds()) {
8406 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
8407 if (GEPI->hasAllZeroIndices()) {
8409 Instruction *NC = new BitCastInst(GEPI->getOperand(0), GEPI->getType(),
8410 GEPI->getName(), GEPI->getIterator());
8411 NC->setDebugLoc(GEPI->getDebugLoc());
8412 replaceAllUsesWith(GEPI, NC, FreshBBs, IsHugeFunc);
8414 GEPI, TLInfo, nullptr,
8420 if (tryUnmergingGEPsAcrossIndirectBr(GEPI, TTI)) {