[PATCH] D105570: [AArch64][SME] Add matrix register definitions and parsing support

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 11:29:07 PDT 2021


c-rhodes created this revision.
c-rhodes added reviewers: sdesmalen, dmgreen, ostannard, kmclaughlin, CarolineConcatto, david-arm.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, mgorny.
c-rhodes requested review of this revision.
Herald added a project: LLVM.

SME introduces the ZA array, a new piece of architectural register state
consisting of a matrix of [SVLb x SVLb] bytes, where SVL is the
implementation defined Streaming SVE vector length and SVLb is the
number of 8-bit elements in a vector of SVL bits.

SME instructions consist of three types of matrix operands:

- Tiles: a ZA tile is a square, two-dimensional sub-array of elements within the ZA array. These tiles make up the larger accumulator array and the granularity varies based on the element size, i.e.
  - ZAQ0..ZAQ15 (smallest tile granule)
  - ZAD0..ZAD7
  - ZAS0..ZAS3
  - ZAH0..ZAH1 or ZAB0       (largest tile granule, single tile)
- Tile vectors: similar to regular tiles, but have an extra 'h' or 'v' to tell how the vector at [reg+offset] is layed out in the tile, horizontally or vertically. E.g. za1h.h or za15v.q, which corresponds to vectors in registers ZAH1 and ZAQ15, respectively.
- Accumulator matrix: this is the entire accumulator array ZA.

This patch adds the register classes and related operands and parsing
for SME instructions operating on the accumulator array.

The ADDHA and ADDVA instructions which operate on tiles are also added
in this patch to make some use of the code added, later patches will
make use of the other operands introduced here.

The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2021-06

Co-authored by: Sander de Smalen (@sdesmalen)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105570

Files:
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/lib/Target/AArch64/AArch64RegisterInfo.td
  llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td
  llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
  llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
  llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
  llvm/lib/Target/AArch64/SMEInstrFormats.td
  llvm/test/MC/AArch64/SME/addha-diagnostics.s
  llvm/test/MC/AArch64/SME/addha-u32.s
  llvm/test/MC/AArch64/SME/addha-u64.s
  llvm/test/MC/AArch64/SME/addva-diagnostics.s
  llvm/test/MC/AArch64/SME/addva-u32.s
  llvm/test/MC/AArch64/SME/addva-u64.s
  llvm/unittests/Target/AArch64/CMakeLists.txt
  llvm/unittests/Target/AArch64/MatrixRegisterAliasing.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105570.357015.patch
Type: text/x-patch
Size: 55679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210707/e26168de/attachment-0001.bin>


More information about the llvm-commits mailing list