[PATCH] D49592: [AArch64][SVE] Asm: Add MOVPRFX instructions.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 20 02:36:25 PDT 2018


sdesmalen created this revision.
sdesmalen added reviewers: rengolin, SjoerdMeijer, samparker, fhahn, javed.absar.
Herald added subscribers: rkruppe, kristof.beyls, tschuett.

This patch adds predicated and unpredicated MOVPRFX instructions, which
can be prepended to SVE instructions that are destructive on their first
source operand, to make them a constructive operation, e.g.

  add z1.s, p0/m, z1.s, z2.s        <=> z1 = z1 + z2

can be made constructive:

  movprfx z0, z1
  add z0.s, p0/m, z0.s, z2.s        <=> z0 = z1 + z2

The predicated MOVPRFX instruction can additionally be used to zero
inactive elements, e.g.

  movprfx z0.s, p0/z, z1.s
  add z0.s, p0/m, z0.s, z2.s

Not all instructions can be prefixed with the MOVPRFX instruction
which is why this patch also adds a mechanism to validate prefixed
instructions. The exact rules when a MOVPRFX applies is detailed in
the SVE supplement of the Architectural Reference Manual.

This is patch [1/2] in a series to add MOVPRFX instructions:

- Patch [1/2]: D.....
- Patch [2/2]: D.....


https://reviews.llvm.org/D49592

Files:
  lib/Target/AArch64/AArch64InstrFormats.td
  lib/Target/AArch64/AArch64SVEInstrInfo.td
  lib/Target/AArch64/AArch64SystemOperands.td
  lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  lib/Target/AArch64/SVEInstrFormats.td
  lib/Target/AArch64/Utils/AArch64BaseInfo.cpp
  lib/Target/AArch64/Utils/AArch64BaseInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49592.156451.patch
Type: text/x-patch
Size: 14633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180720/b3da7571/attachment.bin>


More information about the llvm-commits mailing list