OSDN Git Service

[AArch64][SVE] Asm: Add MOVPRFX instructions.
authorSander de Smalen <sander.desmalen@arm.com>
Mon, 30 Jul 2018 15:42:46 +0000 (15:42 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Mon, 30 Jul 2018 15:42:46 +0000 (15:42 +0000)
commitc80d03aba541afe2808d6221d0458484e44d18b6
tree7d067d7ed7055889b50817f4970fd086f5b5e035
parentb8b1cb30e789c775e8c1001b8a7c2fd527aa0ba2
[AArch64][SVE] Asm: Add MOVPRFX instructions.

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]: https://reviews.llvm.org/D49592
- Patch [2/2]: https://reviews.llvm.org/D49593

Reviewers: rengolin, SjoerdMeijer, samparker, fhahn, javed.absar

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D49592

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338258 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrFormats.td
lib/Target/AArch64/AArch64InstrInfo.h
lib/Target/AArch64/AArch64RegisterInfo.td
lib/Target/AArch64/AArch64SVEInstrInfo.td
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
lib/Target/AArch64/SVEInstrFormats.td