[llvm] [LV] Fix MVE regression from #132190 (PR #141736)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 08:15:24 PDT 2025


SamTebbs33 wrote:

> I haven't looked deeply into the details but there were a number of pretty large MVE regressions (and some improvements), only one of which was reported on #132190. MVE doesn't have a lot of registers but can deal with spills/reloads quite efficiently much of the time. Ideally it wouldn't be a strict yes/no but the cost of spilling would be included in the estimated cost of the vector factor.
> 
> There is another example in https://godbolt.org/z/Koeo86sYf, but it doesn't require any spilling. You can't really calculate register pressure (linearly) without scheduling the instructions in some way.
> 
> MVE doesn't enable maximise bandwidth. Would it be better to just have a target hook for whether regpressure should exclude a VF?

Thanks Dave, I've had a look at the compiler explorer example you shared and it looks like there's no difference between current main, the "only check reg usage when max bandwidth is enabled" approach and the "treat VPWidenPointerInduction as a scalar" approach. So at least that one isn't regressing.

I'm in favour of Florian's suggestion to revert back to a stable point where register usage is only checked when maxbw is enabled and improve individual cases gradually, before perhaps enable register usage checking globally once the regressing cases are sorted out.

https://github.com/llvm/llvm-project/pull/141736


More information about the llvm-commits mailing list