Skip to content

Commit

Permalink
[VPlan] Replace check for replicate regions with assert (NFCI).
Browse files Browse the repository at this point in the history
After recent changes, replication regions only get introduced later, so
there's no need to check for them.
  • Loading branch information
fhahn committed Apr 5, 2023
1 parent b80ae65 commit c18bc7f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,10 @@ static bool properlyDominates(const VPRecipeBase *A, const VPRecipeBase *B,
if (ParentA == ParentB)
return LocalComesBefore(A, B);

const VPRegionBlock *RegionA =
GetReplicateRegion(const_cast<VPRecipeBase *>(A));
const VPRegionBlock *RegionB =
GetReplicateRegion(const_cast<VPRecipeBase *>(B));
if (RegionA)
ParentA = RegionA->getExiting();
if (RegionB)
ParentB = RegionB->getExiting();
assert(!GetReplicateRegion(const_cast<VPRecipeBase *>(A)) &&
"No replicate regions expected at this point");
assert(!GetReplicateRegion(const_cast<VPRecipeBase *>(B)) &&
"No replicate regions expected at this point");
return VPDT.properlyDominates(ParentA, ParentB);
}

Expand Down

0 comments on commit c18bc7f

Please sign in to comment.