[PATCH] D145495: [RISCV] Lower vector_{interleave,deinterleave} for NF > 2

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 07:58:48 PST 2023


reames added a comment.

For later consideration...

I think we can avoid falling back to the vrgather case for e.g. interleave 4 on i8.  The basic idea is that an interleave 4 on i8 is a pair of two interleave 2 on i8 followed by a single interleave 2 on i16.  Each of those three interleaves can be done via the existing lowering.  Essentially, we can recursively decompose.

The non-power of two factors are a bit tricker, but I think we can pad with a dummy vector, and then use a single vrgather at the end to compact.  I'm not 100% sure this works; we have to be sure the padding fits within the legal element type.

We still have to fall back for edge cases though, so we're going to need the generic logic either way.  Probably worth staging commits.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145495



More information about the llvm-commits mailing list