[PATCH] D107903: [AArch64][SME] Support NEON vector to GPR integer moves in streaming mode

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 07:18:55 PDT 2021


c-rhodes created this revision.
c-rhodes added reviewers: paulwalker-arm, david-arm, kmclaughlin.
Herald added subscribers: ctetreau, hiraditya, kristof.beyls.
c-rhodes requested review of this revision.
Herald added a project: LLVM.

A small subset of the NEON instruction set is legal in streaming mode.
This patch adds support for the following vector to integer move
instructions:

  0x00 1110 0000 0001 0010 11xx xxxx xxxx # SMOV W|Xd,Vn.B[0]
  0x00 1110 0000 0010 0010 11xx xxxx xxxx # SMOV W|Xd,Vn.H[0]
  0100 1110 0000 0100 0010 11xx xxxx xxxx # SMOV Xd,Vn.S[0]
  0000 1110 0000 0001 0011 11xx xxxx xxxx # UMOV Wd,Vn.B[0]
  0000 1110 0000 0010 0011 11xx xxxx xxxx # UMOV Wd,Vn.H[0]
  0000 1110 0000 0100 0011 11xx xxxx xxxx # UMOV Wd,Vn.S[0]
  0100 1110 0000 1000 0011 11xx xxxx xxxx # UMOV Xd,Vn.D[0]

Only the zero index variants are legal, all others indexes are illegal.
To support this, new instructions are defined specifically for zero
index which is hardcoded, along an implicit 'VectorIndex0' operand.
Since the index operand is implicit and takes no bits in the encoding,
custom decoding is required to add the operand.

I'm not sure if this is the best approach but the predicate constraint
on a subset of an operand is unusual. Would be interested to hear some
alternatives.

The instructions are predicated on 'HasNEONorStreamingSVE', i.e. they're
enabled by either +neon or +streaming-sve. This follows on from the work
in D106272 <https://reviews.llvm.org/D106272> to support the subset of SVE(2) instructions that are legal
in streaming mode.

Depends on D107902 <https://reviews.llvm.org/D107902>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107903

Files:
  llvm/lib/Target/AArch64/AArch64InstrFormats.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
  llvm/test/MC/AArch64/SME/streaming-mode-neon-negative.s
  llvm/test/MC/AArch64/SME/streaming-mode-neon.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107903.365747.patch
Type: text/x-patch
Size: 13717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210811/3ea571fe/attachment.bin>


More information about the llvm-commits mailing list