[PATCH] D130895: [RISCV] Make VL choosing for a splat-like VMV based on its users

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 10:52:24 PDT 2022


reames added a comment.

I've looked at a few ideas in this area, and there's an interaction I want to point out that I don't have a good answer for.

While reducing the VL of a splat to match the demanded lanes can remove vsetv toggles, it can also add them.  Specifically, if the splat happens to be scheduled in a region which uses the original wider VL, then reducing the VL actually pessimizes the code.  This actually shows up in mixed VL code, particularly when combined with LICM for splats which can't be folded (profitably) into their users.

We can patch part of this by extending InsertVSETVLI to allow increasing VL on splats if the splat is TA.  However, there's still a scheduling interaction here which is a bit hard to account for.

I generally do believe that having VL reduction for all computation (not just splats) is generally a good idea; I'm just trying to figure out how to slice the pieces so that we can get there incrementally without nasty regressions along the way.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130895/new/

https://reviews.llvm.org/D130895



More information about the llvm-commits mailing list