[llvm] c18bc7f - [VPlan] Replace check for replicate regions with assert (NFCI).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 06:30:12 PDT 2023
Author: Florian Hahn
Date: 2023-04-05T14:29:24+01:00
New Revision: c18bc7f7feac94e9abf2e65345c33709a2451eb0
URL: https://github.com/llvm/llvm-project/commit/c18bc7f7feac94e9abf2e65345c33709a2451eb0
DIFF: https://github.com/llvm/llvm-project/commit/c18bc7f7feac94e9abf2e65345c33709a2451eb0.diff
LOG: [VPlan] Replace check for replicate regions with assert (NFCI).
After recent changes, replication regions only get introduced later, so
there's no need to check for them.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 99f600002336..07abcdc27edb 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -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);
}
More information about the llvm-commits
mailing list