Lines Matching refs:I0
1444 const Instruction *I0 = Insts.front();
1446 if (!I->isSameOperationAs(I0))
1453 if (!isa<StoreInst>(I0)) {
1454 auto *PNUse = dyn_cast<PHINode>(*I0->user_begin());
1455 auto *Succ = I0->getParent()->getTerminator()->getSuccessor(0);
1474 if (isa<StoreInst>(I0) && any_of(Insts, [](const Instruction *I) {
1478 if (isa<LoadInst>(I0) && any_of(Insts, [](const Instruction *I) {
1483 for (unsigned OI = 0, OE = I0->getNumOperands(); OI != OE; ++OI) {
1484 if (I0->getOperand(OI)->getType()->isTokenTy())
1488 auto SameAsI0 = [&I0, OI](const Instruction *I) {
1489 assert(I->getNumOperands() == I0->getNumOperands());
1490 return I->getOperand(OI) == I0->getOperand(OI);
1493 if (!canReplaceOperandWithVariable(I0, OI))
1497 if ((isa<CallInst>(I0) || isa<InvokeInst>(I0)) && OI == OE - 1) {
1530 Instruction *I0 = Insts.front();
1531 if (!isa<StoreInst>(I0)) {
1532 auto *PNUse = dyn_cast<PHINode>(*I0->user_begin());
1543 for (unsigned O = 0, E = I0->getNumOperands(); O != E; ++O) {
1550 bool NeedPHI = any_of(Insts, [&I0, O](const Instruction *I) {
1551 return I->getOperand(O) != I0->getOperand(O);
1554 NewOperands.push_back(I0->getOperand(O));
1559 auto *Op = I0->getOperand(O);
1568 // Arbitrarily use I0 as the new "common" instruction; remap its operands
1570 for (unsigned O = 0, E = I0->getNumOperands(); O != E; ++O)
1571 I0->getOperandUse(O).set(NewOperands[O]);
1572 I0->moveBefore(&*BBEnd->getFirstInsertionPt());
1576 if (I != I0) {
1581 // This is an N-way merge, which will be inefficient if I0 is a CallInst.
1584 I0->applyMergedLocation(I0->getDebugLoc(), I->getDebugLoc());
1585 combineMetadataForCSE(I0, I);
1586 I0->andIRFlags(I);
1589 if (!isa<StoreInst>(I0)) {
1593 assert(I0->hasOneUse());
1594 auto *PN = cast<PHINode>(*I0->user_begin());
1595 PN->replaceAllUsesWith(I0);
1601 if (I != I0)