[llvm-dev] [RFC] Extending shufflevector for vscale vectors (SVE etc.)
Cameron McInally via llvm-dev
llvm-dev at lists.llvm.org
Thu Apr 2 10:03:34 PDT 2020
On Thu, Jan 30, 2020 at 4:39 PM Eli Friedman via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> > -----Original Message-----
> > From: Richard Sandiford <richard.sandiford at arm.com>
> > Sent: Thursday, January 30, 2020 3:36 AM
> > To: Eli Friedman via llvm-dev <llvm-dev at lists.llvm.org>
> > Cc: Eli Friedman <efriedma at quicinc.com>
> > Subject: [EXT] Re: [llvm-dev] [RFC] Extending shufflevector for vscale vectors
> > (SVE etc.)
> > Eli Friedman via llvm-dev <llvm-dev at lists.llvm.org> writes:
> > > [...]
> > > We can add more shuffles to the list. There are a few SVE shuffle
> > > instructions which are not equivalent to any of the basic operations
> > > I've listed: ext and trn.
> > I realise this wasn't supposed to be an exhaustive list, but FWIW:
> > revb, revh and revw are also useful for reversing each sequence
> > of N elements (as opposed to reversing the whole vector).
> revb is technically already exposed as a target-independent intrinsic (llvm.bswap), but yes, I missed those.
As discussed on the April 2nd SVE Sync-up call, here are a few more
shuffles that I would like to see for Complex:
1) Duplicate even elements of one vector: (<0,0,2,2>) // could be
TRN1(x, x) intrinsic
2) Duplicate odd elements of one vector: (<1,1,3,3>). // could be
TRN2(x, x) intrinsic
3) Swap even/odd elements of one vector: (<1,0,3,2>) // could be
select(1010b, TRN1(x,x), TRN2(x,x))
The other shuffles that I need locally have been covered already.
More information about the llvm-dev