[AArch64] Add all SME2.1 instructions Assembly/Disassembly
authorCaroline Concatto <caroline.concatto@arm.com>
Thu, 3 Nov 2022 12:18:20 +0000 (12:18 +0000)
committerCaroline Concatto <caroline.concatto@arm.com>
Mon, 14 Nov 2022 14:56:16 +0000 (14:56 +0000)
commit3eacda4547c59c3daa2daf275321c8013eb485cd
tree99a6998d6c4d7a92621cb7626d8b673032288f54
parent458ae539dffd0ec2c02d3f4121b65b54bfd655ab
[AArch64] Add all SME2.1 instructions Assembly/Disassembly

This patch adds a new feature flag:
sme-f16f16 to represent FEAT_SME-F16F16

This patch add the following instructions:
SME2.1 stand alone instructions:
   MOVAZ (array to vector, four registers): Move and zero four ZA single-vector groups to vector registers.
         (array to vector, two registers): Move and zero two ZA single-vector groups to vector registers.
         (tile to vector, four registers): Move and zero four ZA tile slices to vector registers.
         (tile to vector, single): Move and zero ZA tile slice to vector register.
         (tile to vector, two registers): Move and zero two ZA tile slices to vector registers.

   LUTI2 (Strided four registers): Lookup table read with 2-bit indexes.
         (Strided two registers): Lookup table read with 2-bit indexes.

   LUTI4 (Strided four registers): Lookup table read with 4-bit indexes.
         (Strided two registers): Lookup table read with 4-bit indexes.

   ZERO (double-vector): Zero ZA double-vector groups.
        (quad-vector): Zero ZA quad-vector groups.
        (single-vector): Zero ZA single-vector groups.

SME2p1 and SME-F16F16:
 All instructions are half precision elements:
   FADD: Floating-point add multi-vector to ZA array vector accumulators.

   FSUB: Floating-point subtract multi-vector from ZA array vector accumulators.

   FMLA (multiple and indexed vector): Multi-vector floating-point fused multiply-add by indexed element.
        (multiple and single vector): Multi-vector floating-point fused multiply-add by vector.
        (multiple vectors): Multi-vector floating-point fused multiply-add.

   FMLS (multiple and indexed vector): Multi-vector floating-point fused multiply-subtract by indexed element.
        (multiple and single vector): Multi-vector floating-point fused multiply-subtract by vector.
        (multiple vectors): Multi-vector floating-point fused multiply-subtract.

   FCVT (widening): Multi-vector floating-point convert from half-precision to single-precision (in-order).

   FCVTL: Multi-vector floating-point convert from half-precision to deinterleaved single-precision.

   FMOPA (non-widening): Floating-point outer product and accumulate.

   FMOPS (non-widening): Floating-point outer product and subtract.

SME2p1 and B16B16:
   BFADD: BFloat16 floating-point add multi-vector to ZA array vector accumulators.

   BFSUB: BFloat16 floating-point subtract multi-vector from ZA array vector accumulators.

   BFCLAMP: Multi-vector BFloat16 floating-point clamp to minimum/maximum number.

   BFMLA (multiple and indexed vector): Multi-vector BFloat16 floating-point fused multiply-add by indexed element.
         (multiple and single vector): Multi-vector BFloat16 floating-point fused multiply-add by vector.
         (multiple vectors): Multi-vector BFloat16 floating-point fused multiply-add.

   BFMLS (multiple and indexed vector): Multi-vector BFloat16 floating-point fused multiply-subtract by indexed element.
         (multiple and single vector): Multi-vector BFloat16 floating-point fused multiply-subtract by vector.
         (multiple vectors): Multi-vector BFloat16 floating-point fused multiply-subtract.

   BFMAX (multiple and single vector): Multi-vector BFloat16 floating-point maximum by vector.
         (multiple vectors): Multi-vector BFloat16 floating-point maximum.

   BFMAXNM (multiple and single vector): Multi-vector BFloat16 floating-point maximum number by vector.
           (multiple vectors): Multi-vector BFloat16 floating-point maximum number.

   BFMIN (multiple and single vector): Multi-vector BFloat16 floating-point minimum by vector.
         (multiple vectors): Multi-vector BFloat16 floating-point minimum.

   BFMINNM (multiple and single vector): Multi-vector BFloat16 floating-point minimum number by vector.
           (multiple vectors): Multi-vector BFloat16 floating-point minimum number.

   BFMOPA (non-widening): BFloat16 floating-point outer product and accumulate.

   BFMOPS (non-widening): BFloat16 floating-point outer product and subtract.

The reference can be found here:

https://developer.arm.com/documentation/ddi0602/2022-09

Differential Revision: https://reviews.llvm.org/D137571
58 files changed:
llvm/include/llvm/Support/AArch64TargetParser.def
llvm/include/llvm/Support/AArch64TargetParser.h
llvm/lib/Target/AArch64/AArch64.td
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/lib/Target/AArch64/AArch64RegisterInfo.td
llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td
llvm/lib/Target/AArch64/AArch64SchedA64FX.td
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/lib/Target/AArch64/SMEInstrFormats.td
llvm/test/MC/AArch64/SME2/fmla-diagnostics.s
llvm/test/MC/AArch64/SME2/fmls-diagnostics.s
llvm/test/MC/AArch64/SME2p1/bfadd-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfadd.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfclamp-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfclamp.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmax-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmax.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmaxnm-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmaxnm.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmin-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmin.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfminnm-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfminnm.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmla-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmla.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmls-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmls.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmopa-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmopa.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmops-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfmops.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfsub-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/bfsub.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fadd-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fadd.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fcvt-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fcvt.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fcvtl-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fcvtl.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmla-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmla.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmls-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmls.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmopa-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmopa.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmops-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fmops.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fsub-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/fsub.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/luti2-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/luti2.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/luti4-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/luti4.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/movaz-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/movaz.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/zero-diagnostics.s [new file with mode: 0644]
llvm/test/MC/AArch64/SME2p1/zero.s [new file with mode: 0644]
llvm/unittests/Support/TargetParserTest.cpp