[AArch64][SVE] Asm: Support for LAST(A|B) and CLAST(A|B) instructions.
authorSander de Smalen <sander.desmalen@arm.com>
Wed, 11 Jul 2018 10:08:00 +0000 (10:08 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Wed, 11 Jul 2018 10:08:00 +0000 (10:08 +0000)
commita90530f7c108afc61af9b1d4c57d8fe62cf25908
tree36423d87f07deadc58f165c50bdee71ca58fcb0a
parentb98f504850123e345d0470cb0bfec67eb6e7a679
[AArch64][SVE] Asm: Support for LAST(A|B) and CLAST(A|B) instructions.

The LASTB and LASTA instructions extract the last active element,
or element after the last active, from the source vector.

The added variants are:

  Scalar:
  last(a|b)  w0, p0, z0.b
  last(a|b)  w0, p0, z0.h
  last(a|b)  w0, p0, z0.s
  last(a|b)  x0, p0, z0.d

  SIMD & FP Scalar:
  last(a|b)  b0, p0, z0.b
  last(a|b)  h0, p0, z0.h
  last(a|b)  s0, p0, z0.s
  last(a|b)  d0, p0, z0.d

The CLASTB and CLASTA conditionally extract the last or element after
the last active element from the source vector.

The added variants are:

  Scalar:
  clast(a|b)  w0, p0, w0, z0.b
  clast(a|b)  w0, p0, w0, z0.h
  clast(a|b)  w0, p0, w0, z0.s
  clast(a|b)  x0, p0, x0, z0.d

  SIMD & FP Scalar:
  clast(a|b)  b0, p0, b0, z0.b
  clast(a|b)  h0, p0, h0, z0.h
  clast(a|b)  s0, p0, s0, z0.s
  clast(a|b)  d0, p0, d0, z0.d

  Vector:
  clast(a|b)  z0.b, p0, z0.b, z1.b
  clast(a|b)  z0.h, p0, z0.h, z1.h
  clast(a|b)  z0.s, p0, z0.s, z1.s
  clast(a|b)  z0.d, p0, z0.d, z1.d

Please refer to the architecture specification for more details on
the semantics of the added instructions.

llvm-svn: 336783
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/lib/Target/AArch64/SVEInstrFormats.td
llvm/test/MC/AArch64/SVE/clasta-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SVE/clasta.s [new file with mode: 0644]
llvm/test/MC/AArch64/SVE/clastb-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SVE/clastb.s [new file with mode: 0644]
llvm/test/MC/AArch64/SVE/lasta-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SVE/lasta.s [new file with mode: 0644]
llvm/test/MC/AArch64/SVE/lastb-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SVE/lastb.s [new file with mode: 0644]