[llvm] [LV] Trim VFs that cause vector splitting when tail-folding with EVL (PR #222836)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 02:40:05 PDT 2026
lukel97 wrote:
> Is there any way to improve the EVL optimizer to catch this?
I don't think this is really a RISCVVLOptimizer problem because whilst the vl optimizer can reduce the vl, it's still going to create a lot of vl toggles which I presume aren't optimal. Ideally we would just choose types that don't require splitting to begin with.
> Do we need to return invalid costs or would it be sufficient to increase the cost of such operations? With that I would expect the cost model to not pick such VFs, unless the cost outweighs potential other benefits
Increasing it or making it invalid would both work, that's the approach outlined in https://github.com/llvm/llvm-project/pull/221913 but it still has the impact on VectorCombine/SLP. I'm not sure how often it would show up in practice though.
https://github.com/llvm/llvm-project/pull/222836
More information about the llvm-commits
mailing list