diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp index 10a67081a0d09..568f9ab095e5c 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp @@ -549,8 +549,8 @@ static VPRegionBlock *GetReplicateRegion(VPRecipeBase *R) { return nullptr; } -static bool dominates(const VPRecipeBase *A, const VPRecipeBase *B, - VPDominatorTree &VPDT) { +static bool properlyDominates(const VPRecipeBase *A, const VPRecipeBase *B, + VPDominatorTree &VPDT) { auto LocalComesBefore = [](const VPRecipeBase *A, const VPRecipeBase *B) { for (auto &R : *A->getParent()) { if (&R == A) @@ -573,7 +573,7 @@ static bool dominates(const VPRecipeBase *A, const VPRecipeBase *B, ParentA = RegionA->getExiting(); if (RegionB) ParentB = RegionB->getExiting(); - return VPDT.dominates(ParentA, ParentB); + return VPDT.properlyDominates(ParentA, ParentB); } // Sink users of \p FOR after the recipe defining the previous value \p Previous @@ -592,7 +592,7 @@ sinkRecurrenceUsersAfterPrevious(VPFirstOrderRecurrencePHIRecipe *FOR, "The previous value cannot depend on the users of the recurrence phi."); if (isa(SinkCandidate) || !Seen.insert(SinkCandidate).second || - dominates(Previous, SinkCandidate, VPDT)) + properlyDominates(Previous, SinkCandidate, VPDT)) return; WorkList.push_back(SinkCandidate); @@ -613,7 +613,7 @@ sinkRecurrenceUsersAfterPrevious(VPFirstOrderRecurrencePHIRecipe *FOR, // Keep recipes to sink ordered by dominance so earlier instructions are // processed first. sort(WorkList, [&VPDT](const VPRecipeBase *A, const VPRecipeBase *B) { - return dominates(A, B, VPDT); + return properlyDominates(A, B, VPDT); }); for (VPRecipeBase *SinkCandidate : WorkList) {