• Home
  • Raw
  • Download

Lines Matching refs:Cur

273     Instruction *Cur = Worklist.back();  in AddReductionVar()  local
279 if (Cur->use_empty()) in AddReductionVar()
282 bool IsAPhi = isa<PHINode>(Cur); in AddReductionVar()
285 if (Cur != Phi && IsAPhi && Cur->getParent() == Phi->getParent()) in AddReductionVar()
290 if (!Cur->isCommutative() && !IsAPhi && !isa<SelectInst>(Cur) && in AddReductionVar()
291 !isa<ICmpInst>(Cur) && !isa<FCmpInst>(Cur) && in AddReductionVar()
292 !VisitedInsts.count(dyn_cast<Instruction>(Cur->getOperand(0)))) in AddReductionVar()
298 if (Cur != Start) { in AddReductionVar()
299 ReduxDesc = isRecurrenceInstr(Cur, Kind, ReduxDesc, HasFunNoNaNAttr); in AddReductionVar()
307 bool IsASelect = isa<SelectInst>(Cur); in AddReductionVar()
312 hasMultipleUsesOf(Cur, VisitedInsts, 2)) in AddReductionVar()
317 Kind != RK_FloatMinMax && hasMultipleUsesOf(Cur, VisitedInsts, 1)) in AddReductionVar()
321 if (IsAPhi && Cur != Phi && !areAllUsesIn(Cur, VisitedInsts)) in AddReductionVar()
325 (isa<ICmpInst>(Cur) || isa<SelectInst>(Cur))) in AddReductionVar()
327 if (Kind == RK_FloatMinMax && (isa<FCmpInst>(Cur) || isa<SelectInst>(Cur))) in AddReductionVar()
331 FoundReduxOp |= !IsAPhi && Cur != Start; in AddReductionVar()
338 for (User *U : Cur->users()) { in AddReductionVar()
346 if (ExitInstruction == Cur) in AddReductionVar()
353 if (ExitInstruction != nullptr || Cur == Phi) in AddReductionVar()
359 if (!is_contained(Phi->operands(), Cur)) in AddReductionVar()
362 ExitInstruction = Cur; in AddReductionVar()
846 auto getNextInstruction = [&](Instruction *Cur) { in getReductionOpChain() argument
850 if (isa<SelectInst>(*Cur->user_begin())) in getReductionOpChain()
851 return cast<Instruction>(*Cur->user_begin()); in getReductionOpChain()
853 return cast<Instruction>(*std::next(Cur->user_begin())); in getReductionOpChain()
855 return cast<Instruction>(*Cur->user_begin()); in getReductionOpChain()
857 auto isCorrectOpcode = [&](Instruction *Cur) { in getReductionOpChain() argument
861 matchSelectPattern(Cur, LHS, RHS).Flavor); in getReductionOpChain()
863 return Cur->getOpcode() == RedOp; in getReductionOpChain()
876 Instruction *Cur = getNextInstruction(Phi); in getReductionOpChain() local
880 while (Cur != LoopExitInstr) { in getReductionOpChain()
881 if (!isCorrectOpcode(Cur) || !Cur->hasNUses(ExpectedUses)) in getReductionOpChain()
884 ReductionOperations.push_back(Cur); in getReductionOpChain()
885 Cur = getNextInstruction(Cur); in getReductionOpChain()
888 ReductionOperations.push_back(Cur); in getReductionOpChain()