[llvm] [LV] Use vscale for tuning when updating profile information (PR #143690)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 06:57:15 PDT 2025
================
@@ -2787,10 +2801,10 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State) {
//
// For scalable vectorization we can't know at compile time how many
// iterations of the loop are handled in one vector iteration, so instead
- // assume a pessimistic vscale of '1'.
+ // use the value of vscale used for tuning.
Loop *VectorLoop = LI->getLoopFor(HeaderBB);
- setProfileInfoAfterUnrolling(OrigLoop, VectorLoop, OrigLoop,
- VF.getKnownMinValue() * UF);
+ unsigned VFxUF = getEstimatedRuntimeVF(VF * UF, Cost->getVScaleForTuning());
----------------
fhahn wrote:
```suggestion
unsigned EstimatedVFxUF = getEstimatedRuntimeVF(VF * UF, Cost->getVScaleForTuning());
```
Might be worth updating the name as well?
https://github.com/llvm/llvm-project/pull/143690
More information about the llvm-commits
mailing list