[VPlan] Replace check for replicate regions with assert (NFCI).
authorFlorian Hahn <flo@fhahn.com>
Wed, 5 Apr 2023 13:29:24 +0000 (14:29 +0100)
committerFlorian Hahn <flo@fhahn.com>
Wed, 5 Apr 2023 13:29:24 +0000 (14:29 +0100)
After recent changes, replication regions only get introduced later, so
there's no need to check for them.

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

index 99f6000..07abcdc 100644 (file)
@@ -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);
 }