Lines Matching refs:IncV

818 bool SCEVExpander::isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV,  in isNormalAddRecExprPHI()  argument
820 if (IncV->getNumOperands() == 0 || isa<PHINode>(IncV) || in isNormalAddRecExprPHI()
821 (isa<CastInst>(IncV) && !isa<BitCastInst>(IncV))) in isNormalAddRecExprPHI()
827 for (User::op_iterator OI = IncV->op_begin()+1, in isNormalAddRecExprPHI()
828 OE = IncV->op_end(); OI != OE; ++OI) in isNormalAddRecExprPHI()
834 IncV = dyn_cast<Instruction>(IncV->getOperand(0)); in isNormalAddRecExprPHI()
835 if (!IncV) in isNormalAddRecExprPHI()
838 if (IncV->mayHaveSideEffects()) in isNormalAddRecExprPHI()
841 if (IncV != PN) in isNormalAddRecExprPHI()
844 return isNormalAddRecExprPHI(PN, IncV, L); in isNormalAddRecExprPHI()
856 Instruction *SCEVExpander::getIVIncOperand(Instruction *IncV, in getIVIncOperand() argument
859 if (IncV == InsertPos) in getIVIncOperand()
862 switch (IncV->getOpcode()) { in getIVIncOperand()
868 Instruction *OInst = dyn_cast<Instruction>(IncV->getOperand(1)); in getIVIncOperand()
870 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
874 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
876 for (Instruction::op_iterator I = IncV->op_begin()+1, E = IncV->op_end(); in getIVIncOperand()
892 if (IncV->getNumOperands() != 2) in getIVIncOperand()
894 unsigned AS = cast<PointerType>(IncV->getType())->getAddressSpace(); in getIVIncOperand()
895 if (IncV->getType() != Type::getInt1PtrTy(SE.getContext(), AS) in getIVIncOperand()
896 && IncV->getType() != Type::getInt8PtrTy(SE.getContext(), AS)) in getIVIncOperand()
900 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
907 bool SCEVExpander::hoistIVInc(Instruction *IncV, Instruction *InsertPos) { in hoistIVInc() argument
908 if (SE.DT->dominates(IncV, InsertPos)) in hoistIVInc()
914 || !SE.DT->dominates(InsertPos->getParent(), IncV->getParent())) in hoistIVInc()
920 Instruction *Oper = getIVIncOperand(IncV, InsertPos, /*allowScale*/true); in hoistIVInc()
924 IVIncs.push_back(IncV); in hoistIVInc()
925 IncV = Oper; in hoistIVInc()
926 if (SE.DT->dominates(IncV, InsertPos)) in hoistIVInc()
941 bool SCEVExpander::isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, in isExpandedAddRecExprPHI() argument
943 for(Instruction *IVOper = IncV; in isExpandedAddRecExprPHI()
958 Value *IncV; in expandIVInc() local
968 IncV = expandAddToGEP(StepArray, StepArray+1, GEPPtrTy, IntTy, PN); in expandIVInc()
969 if (IncV->getType() != PN->getType()) { in expandIVInc()
970 IncV = Builder.CreateBitCast(IncV, PN->getType()); in expandIVInc()
971 rememberInstruction(IncV); in expandIVInc()
974 IncV = useSubtract ? in expandIVInc()
977 rememberInstruction(IncV); in expandIVInc()
979 return IncV; in expandIVInc()
1074 Instruction *IncV = nullptr; in getAddRecExprPHILiterally() local
1115 IncV = TempIncV; in getAddRecExprPHILiterally()
1129 IncV = TempIncV; in getAddRecExprPHILiterally()
1138 hoistBeforePos(SE.DT, IncV, IVIncInsertPos, AddRecPhiMatch); in getAddRecExprPHILiterally()
1144 rememberInstruction(IncV); in getAddRecExprPHILiterally()
1213 Value *IncV = expandIVInc(PN, StepV, L, ExpandTy, IntTy, useSubtract); in getAddRecExprPHILiterally() local
1215 if (isa<OverflowingBinaryOperator>(IncV)) { in getAddRecExprPHILiterally()
1217 cast<BinaryOperator>(IncV)->setHasNoUnsignedWrap(); in getAddRecExprPHILiterally()
1219 cast<BinaryOperator>(IncV)->setHasNoSignedWrap(); in getAddRecExprPHILiterally()
1221 PN->addIncoming(IncV, Pred); in getAddRecExprPHILiterally()