@@ -593,7 +593,7 @@ void VPlanTransforms::createLoopRegions(VPlan &Plan) {
593
593
bool VPlanTransforms::handleFMaxReductionsWithoutFastMath (VPlan &Plan) {
594
594
VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion ();
595
595
VPReductionPHIRecipe *RedPhiR = nullptr ;
596
- VPRecipeWithIRFlags *MinMaxOp = nullptr ;
596
+ VPRecipeWithIRFlags *MaxOp = nullptr ;
597
597
VPWidenIntOrFpInductionRecipe *WideIV = nullptr ;
598
598
599
599
// Check if there are any FCmpOGTSelect reductions using wide selects that we
@@ -630,9 +630,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
630
630
!(RepR && (isa<SelectInst>(RepR->getUnderlyingInstr ()))))
631
631
return false ;
632
632
633
- MinMaxOp = cast<VPRecipeWithIRFlags>(Inc);
634
- auto *Cmp = cast<VPRecipeWithIRFlags>(MinMaxOp ->getOperand (0 ));
635
- if (MinMaxOp ->getOperand (1 ) == RedPhiR ||
633
+ MaxOp = cast<VPRecipeWithIRFlags>(Inc);
634
+ auto *Cmp = cast<VPRecipeWithIRFlags>(MaxOp ->getOperand (0 ));
635
+ if (MaxOp ->getOperand (1 ) == RedPhiR ||
636
636
!CmpInst::isStrictPredicate (Cmp->getPredicate ()))
637
637
return false ;
638
638
}
@@ -662,9 +662,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
662
662
auto *IdxPhi = new VPReductionPHIRecipe (nullptr , RecurKind::FindFirstIVUMin,
663
663
*UMinSentinel, false , false , 1 );
664
664
IdxPhi->insertBefore (RedPhiR);
665
- auto *MinIdxSel = new VPInstruction (
666
- Instruction::Select, {MinMaxOp ->getOperand (0 ), WideIV, IdxPhi});
667
- MinIdxSel->insertAfter (MinMaxOp );
665
+ auto *MinIdxSel = new VPInstruction (Instruction::Select,
666
+ {MaxOp ->getOperand (0 ), WideIV, IdxPhi});
667
+ MinIdxSel->insertAfter (MaxOp );
668
668
IdxPhi->addOperand (MinIdxSel);
669
669
670
670
// Find the first index of with the maximum value. This is used to extract the
0 commit comments