@@ -632,7 +632,7 @@ void VPlanTransforms::attachCheckBlock(VPlan &Plan, Value *Cond,
632
632
bool VPlanTransforms::handleFMaxReductionsWithoutFastMath (VPlan &Plan) {
633
633
VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion ();
634
634
VPReductionPHIRecipe *RedPhiR = nullptr ;
635
- VPRecipeWithIRFlags *MinMaxOp = nullptr ;
635
+ VPRecipeWithIRFlags *MaxOp = nullptr ;
636
636
VPWidenIntOrFpInductionRecipe *WideIV = nullptr ;
637
637
638
638
// Check if there are any FCmpOGTSelect reductions using wide selects that we
@@ -669,9 +669,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
669
669
!(RepR && (isa<SelectInst>(RepR->getUnderlyingInstr ()))))
670
670
return false ;
671
671
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 ||
675
675
!CmpInst::isStrictPredicate (Cmp->getPredicate ()))
676
676
return false ;
677
677
}
@@ -701,9 +701,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
701
701
auto *IdxPhi = new VPReductionPHIRecipe (nullptr , RecurKind::FindFirstIVUMin,
702
702
*UMinSentinel, false , false , 1 );
703
703
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 );
707
707
IdxPhi->addOperand (MinIdxSel);
708
708
709
709
// Find the first index of with the maximum value. This is used to extract the
0 commit comments