Skip to content

Commit ec473e5

Browse files
committed
!fixup MinMaxOp -> MaxOp
1 parent 5675396 commit ec473e5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ void VPlanTransforms::attachCheckBlock(VPlan &Plan, Value *Cond,
632632
bool 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

Comments
 (0)