Lines Matching refs:IncV

950 bool SCEVExpander::isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV,  in isNormalAddRecExprPHI()  argument
952 if (IncV->getNumOperands() == 0 || isa<PHINode>(IncV) || in isNormalAddRecExprPHI()
953 (isa<CastInst>(IncV) && !isa<BitCastInst>(IncV))) in isNormalAddRecExprPHI()
959 for (Use &Op : llvm::drop_begin(IncV->operands())) in isNormalAddRecExprPHI()
965 IncV = dyn_cast<Instruction>(IncV->getOperand(0)); in isNormalAddRecExprPHI()
966 if (!IncV) in isNormalAddRecExprPHI()
969 if (IncV->mayHaveSideEffects()) in isNormalAddRecExprPHI()
972 if (IncV == PN) in isNormalAddRecExprPHI()
975 return isNormalAddRecExprPHI(PN, IncV, L); in isNormalAddRecExprPHI()
987 Instruction *SCEVExpander::getIVIncOperand(Instruction *IncV, in getIVIncOperand() argument
990 if (IncV == InsertPos) in getIVIncOperand()
993 switch (IncV->getOpcode()) { in getIVIncOperand()
999 Instruction *OInst = dyn_cast<Instruction>(IncV->getOperand(1)); in getIVIncOperand()
1001 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
1005 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
1007 for (Use &U : llvm::drop_begin(IncV->operands())) { in getIVIncOperand()
1022 if (IncV->getNumOperands() != 2) in getIVIncOperand()
1024 unsigned AS = cast<PointerType>(IncV->getType())->getAddressSpace(); in getIVIncOperand()
1025 if (IncV->getType() != Type::getInt1PtrTy(SE.getContext(), AS) in getIVIncOperand()
1026 && IncV->getType() != Type::getInt8PtrTy(SE.getContext(), AS)) in getIVIncOperand()
1030 return dyn_cast<Instruction>(IncV->getOperand(0)); in getIVIncOperand()
1054 bool SCEVExpander::hoistIVInc(Instruction *IncV, Instruction *InsertPos) { in hoistIVInc() argument
1055 if (SE.DT.dominates(IncV, InsertPos)) in hoistIVInc()
1061 !SE.DT.dominates(InsertPos->getParent(), IncV->getParent())) in hoistIVInc()
1064 if (!SE.LI.movementPreservesLCSSAForm(IncV, InsertPos)) in hoistIVInc()
1070 Instruction *Oper = getIVIncOperand(IncV, InsertPos, /*allowScale*/true); in hoistIVInc()
1074 IVIncs.push_back(IncV); in hoistIVInc()
1075 IncV = Oper; in hoistIVInc()
1076 if (SE.DT.dominates(IncV, InsertPos)) in hoistIVInc()
1091 bool SCEVExpander::isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, in isExpandedAddRecExprPHI() argument
1093 for(Instruction *IVOper = IncV; in isExpandedAddRecExprPHI()
1108 Value *IncV; in expandIVInc() local
1117 IncV = expandAddToGEP(SE.getSCEV(StepV), GEPPtrTy, IntTy, PN); in expandIVInc()
1118 if (IncV->getType() != PN->getType()) in expandIVInc()
1119 IncV = Builder.CreateBitCast(IncV, PN->getType()); in expandIVInc()
1121 IncV = useSubtract ? in expandIVInc()
1125 return IncV; in expandIVInc()
1224 Instruction *IncV = nullptr; in getAddRecExprPHILiterally() local
1276 IncV = TempIncV; in getAddRecExprPHILiterally()
1290 IncV = TempIncV; in getAddRecExprPHILiterally()
1299 hoistBeforePos(&SE.DT, IncV, IVIncInsertPos, AddRecPhiMatch); in getAddRecExprPHILiterally()
1305 rememberInstruction(IncV); in getAddRecExprPHILiterally()
1308 ReusedValues.insert(IncV); in getAddRecExprPHILiterally()
1381 Value *IncV = expandIVInc(PN, StepV, L, ExpandTy, IntTy, useSubtract); in getAddRecExprPHILiterally() local
1383 if (isa<OverflowingBinaryOperator>(IncV)) { in getAddRecExprPHILiterally()
1385 cast<BinaryOperator>(IncV)->setHasNoUnsignedWrap(); in getAddRecExprPHILiterally()
1387 cast<BinaryOperator>(IncV)->setHasNoSignedWrap(); in getAddRecExprPHILiterally()
1389 PN->addIncoming(IncV, Pred); in getAddRecExprPHILiterally()