[llvm] [RISCV] Separate doLocalPostpass into new pass and move to post vector regalloc (PR #88295)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 09:34:02 PDT 2024


https://github.com/preames commented:

(Focused purely on the extra spill question - code review to follow separately)

Focusing on the specific example presented, I think it's important to note that we have multiple improvements possible in this sequence.

The most important one is that we can split this shuffle and entirely eliminate the high LMUL constrained problem.  This is computing a interleave.  From first principles, we know that each output VREG reads exactly two input VREGs, and we know exactly which ones.  This is a case where we can split a high LMUL vrgather into a linear number of small-LMUL shuffles even without knowing the exact value of VLEN.  Doing so would give the register allocator significantly more flexibility here.

Do we have other real examples?  Based on Luke's numbers, this doesn't seem to happen frequently to begin with.  If all of our examples can be independently improved in practice, I think we can safely ignore this.

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


More information about the llvm-commits mailing list