[PATCH] D144092: [RISCV] Lower interleave and deinterleave intrinsics

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 11:47:50 PST 2023


craig.topper added a comment.

In D144092#4135927 <https://reviews.llvm.org/D144092#4135927>, @luke wrote:

> In D144092#4135349 <https://reviews.llvm.org/D144092#4135349>, @reames wrote:
>
>> I'm wondering whether we should canonicalize fixed length shuffles for interleave and deinterleave to the new nodes, and then have the lowering as you roughly structured it.  This would avoid some of the code duplication.
>
> I agree, the thought crossed my mind as I was reimplementing all of this. It’s exactly the opposite of what SelectionDAGBuilder does in the first place though: it explicitly generates shuffle_vectors from the intrinsics for fixed length vectors.
>
> I know it’s a question that’s been raised before but perhaps it’s worthwhile discussing with the AArch64 folks if shuffle_vectors should be canonically combined into vector_interleave across all targets.
> Presumably a lot of work. 
> And I wonder if they have the same duplication problem too.

Can we extract the code generation from LowerVECTOR_SHUFFLE into a function that we call in two places? That should reduce the duplication.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144092



More information about the llvm-commits mailing list