Lines Matching refs:IncV
674 bool SCEVExpander::isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, in isNormalAddRecExprPHI() argument
676 if (IncV->getNumOperands() == 0 || isa<PHINode>(IncV) || in isNormalAddRecExprPHI()
677 (isa<CastInst>(IncV) && !isa<BitCastInst>(IncV))) in isNormalAddRecExprPHI()
683 for (Use &Op : llvm::drop_begin(IncV->operands())) in isNormalAddRecExprPHI()
689 IncV = dyn_cast<Instruction>(IncV->getOperand(0)); in isNormalAddRecExprPHI()
690 if (!IncV) in isNormalAddRecExprPHI()
693 if (IncV->mayHaveSideEffects()) in isNormalAddRecExprPHI()
696 if (IncV == PN) in isNormalAddRecExprPHI()
699 return isNormalAddRecExprPHI(PN, IncV, L); in isNormalAddRecExprPHI()
711 Instruction *SCEVExpander::getIVIncOperand(Instruction *IncV, in getIVIncOperand() argument
714 if (IncV == InsertPos) in getIVIncOperand()
717 switch (IncV->getOpcode()) { in getIVIncOperand()
723 Instruction *OInst = dyn_cast<Instruction>(IncV->getOperand(1)); in getIVIncOperand()
725 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
729 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
731 for (Use &U : llvm::drop_begin(IncV->operands())) { in getIVIncOperand()
743 if (!cast<GEPOperator>(IncV)->getSourceElementType()->isIntegerTy(8)) in getIVIncOperand()
747 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
771 bool SCEVExpander::hoistIVInc(Instruction *IncV, Instruction *InsertPos, in hoistIVInc() argument
788 if (SE.DT.dominates(IncV, InsertPos)) { in hoistIVInc()
790 FixupPoisonFlags(IncV); in hoistIVInc()
797 !SE.DT.dominates(InsertPos->getParent(), IncV->getParent())) in hoistIVInc()
800 if (!SE.LI.movementPreservesLCSSAForm(IncV, InsertPos)) in hoistIVInc()
806 Instruction *Oper = getIVIncOperand(IncV, InsertPos, /*allowScale*/true); in hoistIVInc()
810 IVIncs.push_back(IncV); in hoistIVInc()
811 IncV = Oper; in hoistIVInc()
812 if (SE.DT.dominates(IncV, InsertPos)) in hoistIVInc()
838 bool SCEVExpander::isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, in isExpandedAddRecExprPHI() argument
840 for(Instruction *IVOper = IncV; in isExpandedAddRecExprPHI()
854 Value *IncV; in expandIVInc() local
858 IncV = Builder.CreatePtrAdd(PN, StepV, "scevgep"); in expandIVInc()
860 IncV = useSubtract ? in expandIVInc()
864 return IncV; in expandIVInc()
944 Instruction *IncV = nullptr; in getAddRecExprPHILiterally() local
994 IncV = TempIncV; in getAddRecExprPHILiterally()
1008 IncV = TempIncV; in getAddRecExprPHILiterally()
1018 rememberInstruction(IncV); in getAddRecExprPHILiterally()
1021 ReusedValues.insert(IncV); in getAddRecExprPHILiterally()
1090 Value *IncV = expandIVInc(PN, StepV, L, useSubtract); in getAddRecExprPHILiterally() local
1092 if (isa<OverflowingBinaryOperator>(IncV)) { in getAddRecExprPHILiterally()
1094 cast<BinaryOperator>(IncV)->setHasNoUnsignedWrap(); in getAddRecExprPHILiterally()
1096 cast<BinaryOperator>(IncV)->setHasNoSignedWrap(); in getAddRecExprPHILiterally()
1098 PN->addIncoming(IncV, Pred); in getAddRecExprPHILiterally()