Lines Matching refs:I0
716 Instruction *I0 = NewInsts[0];
717 for (unsigned OpNum = 0, E = I0->getNumOperands(); OpNum != E; ++OpNum) {
721 if (!canReplaceOperandWithVariable(I0, OpNum))
729 if ((isa<CallInst>(I0) || isa<InvokeInst>(I0)) && OpNum == E - 1 &&
831 Instruction *I0 = Insts.front();
834 for (unsigned O = 0, E = I0->getNumOperands(); O != E; ++O) {
835 bool NeedPHI = llvm::any_of(Insts, [&I0, O](const Instruction *I) {
836 return I->getOperand(O) != I0->getOperand(O);
839 NewOperands.push_back(I0->getOperand(O));
844 auto *Op = I0->getOperand(O);
853 // Arbitrarily use I0 as the new "common" instruction; remap its operands
855 for (unsigned O = 0, E = I0->getNumOperands(); O != E; ++O)
856 I0->getOperandUse(O).set(NewOperands[O]);
857 I0->moveBefore(&*BBEnd->getFirstInsertionPt());
861 if (I != I0) {
862 combineMetadataForCSE(I0, I);
863 I0->andIRFlags(I);
867 if (I != I0)
868 I->replaceAllUsesWith(I0);
873 if (I != I0)