[llvm] [LoopVectorizer] Prune VFs based on plan register pressure (PR #132190)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 07:53:28 PDT 2025
SamTebbs33 wrote:
> > > I _think_ what's caused this is previously in LoopVectorizationCostModel::getMaximizedVFForTarget only VFs greater than MaxVectorElementCount could be discarded for excess register usage, but now any VF can be discarded.
> >
> >
> > Thanks for reporting that John. I'll investigate it.
>
> Did anything happen regarding this?
>
> We also see performance regressions for our out-of-tree target with this patch, it seems to be too restrictive and stop vectorizing in several cases where it's beneficial for us to vectorize. We've worked around it downstream now but given that there are regressions also for ARM it would be interesting to see how that is handled.
I have a fix that restores previous behaviour, in that register usage is only checked when vector bandwidth isn't being maximised, but I'm looking into if there's something about the reproducer loop whose register usage isn't being costed properly. If I can't think of a cost adjustment soon then I'll push up my fix.
https://github.com/llvm/llvm-project/pull/132190
More information about the llvm-commits
mailing list