[llvm] [LoopVectorize] Add the cost of VPInstruction::AnyOf to vplan (PR #125058)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 04:11:14 PST 2025
================
@@ -7539,7 +7539,7 @@ VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
CM.CostKind);
precomputeCosts(BestPlan, BestFactor.Width, CostCtx);
assert((BestFactor.Width == LegacyVF.Width ||
- Legal->hasUncountableEarlyExit() ||
+ BestPlan.hasRegionWithEarlyExit() ||
----------------
david-arm wrote:
Yeah, I struggled with naming too. There is only one exiting block that just happens to have the conditions merged and there is only a single successor - the middle split block. What most accurately describes the CFG is something like:
`doesRegionTerminatorHaveMultipleConditionsForExiting`
or
`isMiddleBlockIndirectSuccessorOfVectorRegion`
but these seem a bit wordy! I'm happy to inline the check here for now, however I imagine at some point it will be useful to have some way of querying this.
https://github.com/llvm/llvm-project/pull/125058
More information about the llvm-commits
mailing list