@@ -632,7 +632,7 @@ void VPlanTransforms::attachCheckBlock(VPlan &Plan, Value *Cond,
632632bool VPlanTransforms::handleFMaxReductionsWithoutFastMath (VPlan &Plan) {
633633 VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion ();
634634 VPReductionPHIRecipe *RedPhiR = nullptr ;
635- VPRecipeWithIRFlags *MinMaxOp = nullptr ;
635+ VPRecipeWithIRFlags *MaxOp = nullptr ;
636636 VPWidenIntOrFpInductionRecipe *WideIV = nullptr ;
637637
638638 // Check if there are any FCmpOGTSelect reductions using wide selects that we
@@ -669,9 +669,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
669669 !(RepR && (isa<SelectInst>(RepR->getUnderlyingInstr ()))))
670670 return false ;
671671
672- MinMaxOp = cast<VPRecipeWithIRFlags>(Inc);
673- auto *Cmp = cast<VPRecipeWithIRFlags>(MinMaxOp ->getOperand (0 ));
674- if (MinMaxOp ->getOperand (1 ) == RedPhiR ||
672+ MaxOp = cast<VPRecipeWithIRFlags>(Inc);
673+ auto *Cmp = cast<VPRecipeWithIRFlags>(MaxOp ->getOperand (0 ));
674+ if (MaxOp ->getOperand (1 ) == RedPhiR ||
675675 !CmpInst::isStrictPredicate (Cmp->getPredicate ()))
676676 return false ;
677677 }
@@ -701,9 +701,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
701701 auto *IdxPhi = new VPReductionPHIRecipe (nullptr , RecurKind::FindFirstIVUMin,
702702 *UMinSentinel, false , false , 1 );
703703 IdxPhi->insertBefore (RedPhiR);
704- auto *MinIdxSel = new VPInstruction (
705- Instruction::Select, {MinMaxOp ->getOperand (0 ), WideIV, IdxPhi});
706- MinIdxSel->insertAfter (MinMaxOp );
704+ auto *MinIdxSel = new VPInstruction (Instruction::Select,
705+ {MaxOp ->getOperand (0 ), WideIV, IdxPhi});
706+ MinIdxSel->insertAfter (MaxOp );
707707 IdxPhi->addOperand (MinIdxSel);
708708
709709 // Find the first index of with the maximum value. This is used to extract the
0 commit comments