Skip to content

Commit 06b1621

Browse files
committed
!fixup MinMaxOp -> MaxOp
1 parent 1d2179e commit 06b1621

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
@@ -593,7 +593,7 @@ void VPlanTransforms::createLoopRegions(VPlan &Plan) {
593593
bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
594594
VPRegionBlock *LoopRegion = Plan.getVectorLoopRegion();
595595
VPReductionPHIRecipe *RedPhiR = nullptr;
596-
VPRecipeWithIRFlags *MinMaxOp = nullptr;
596+
VPRecipeWithIRFlags *MaxOp = nullptr;
597597
VPWidenIntOrFpInductionRecipe *WideIV = nullptr;
598598

599599
// Check if there are any FCmpOGTSelect reductions using wide selects that we
@@ -630,9 +630,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
630630
!(RepR && (isa<SelectInst>(RepR->getUnderlyingInstr()))))
631631
return false;
632632

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 ||
636636
!CmpInst::isStrictPredicate(Cmp->getPredicate()))
637637
return false;
638638
}
@@ -662,9 +662,9 @@ bool VPlanTransforms::handleFMaxReductionsWithoutFastMath(VPlan &Plan) {
662662
auto *IdxPhi = new VPReductionPHIRecipe(nullptr, RecurKind::FindFirstIVUMin,
663663
*UMinSentinel, false, false, 1);
664664
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);
668668
IdxPhi->addOperand(MinIdxSel);
669669

670670
// Find the first index of with the maximum value. This is used to extract the

0 commit comments

Comments
 (0)