diff --git a/llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td b/llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td --- a/llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td +++ b/llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td @@ -396,6 +396,16 @@ defm UMLSLL_VG2_M2Z2Z_BtoS : sme2_mla_ll_array_vg2_multi_32b<"umlsll", 0b110>; defm UMLSLL_VG4_M4Z4Z_BtoS : sme2_mla_ll_array_vg4_multi_32b<"umlsll", 0b110>; +defm BMOPA_TPPZZ : sme2_bmopx_tile_base<"bmopa", 0b000>; +defm BMOPS_TPPZZ : sme2_bmopx_tile_base<"bmops", 0b001>; + +defm SMOPA_TPPZZ : sme2_int_mopx_tile_base<"smopa", 0b100>; +defm SMOPS_TPPZZ : sme2_int_mopx_tile_base<"smops", 0b101>; + +defm UMOPA_TPPZZ : sme2_int_mopx_tile_base<"umopa", 0b110>; +defm UMOPS_TPPZZ : sme2_int_mopx_tile_base<"umops", 0b111>; + + } diff --git a/llvm/lib/Target/AArch64/SMEInstrFormats.td b/llvm/lib/Target/AArch64/SMEInstrFormats.td --- a/llvm/lib/Target/AArch64/SMEInstrFormats.td +++ b/llvm/lib/Target/AArch64/SMEInstrFormats.td @@ -1965,3 +1965,39 @@ def : InstAlias(NAME) MatrixOp64:$ZAda, MatrixIndexGPR32Op8_11:$Rv, uimm1s4range:$imm, ZZZZ_h_mul_r:$Zn, ZZZZ_h_mul_r:$Zm), 0>; } + +//===----------------------------------------------------------------------===// +// SME2 Outer Product and Accumulate +class sme2_mopx_tile_base s, ZPRRegOp vector_ty, string mnemonic> + : I<(outs TileOp32:$ZAda), + (ins TileOp32:$_ZAda, PPR3bAny:$Pn, PPR3bAny:$Pm, vector_ty:$Zn, vector_ty:$Zm), + mnemonic, "\t$ZAda, $Pn/m, $Pm/m, $Zn, $Zm", + "", []>, Sched<[]> { + bits<2> ZAda; + bits<5> Zn; + bits<3> Pn; + bits<3> Pm; + bits<5> Zm; + let Inst{31-30} = 0b10; + let Inst{29} = s{2}; + let Inst{28-25} = 0b0000; + let Inst{24} = s{1}; + let Inst{23-21} = 0b100; + let Inst{20-16} = Zm; + let Inst{15-13} = Pm; + let Inst{12-10} = Pn; + let Inst{9-5} = Zn; + let Inst{4} = s{0}; + let Inst{3-2} = 0b10; + let Inst{1-0} = ZAda; + + let Constraints = "$ZAda = $_ZAda"; +} + +multiclass sme2_bmopx_tile_base s>{ + def NAME: sme2_mopx_tile_base; +} + +multiclass sme2_int_mopx_tile_base s>{ + def NAME: sme2_mopx_tile_base; +} diff --git a/llvm/test/MC/AArch64/SME/smopa-diagnostics.s b/llvm/test/MC/AArch64/SME/smopa-diagnostics.s --- a/llvm/test/MC/AArch64/SME/smopa-diagnostics.s +++ b/llvm/test/MC/AArch64/SME/smopa-diagnostics.s @@ -67,7 +67,7 @@ // expected: .s => .b, .d => .h smopa za0.s, p0/m, p0/m, z0.h, z0.b -// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction // CHECK-NEXT: smopa za0.s, p0/m, p0/m, z0.h, z0.b // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME/smops-diagnostics.s b/llvm/test/MC/AArch64/SME/smops-diagnostics.s --- a/llvm/test/MC/AArch64/SME/smops-diagnostics.s +++ b/llvm/test/MC/AArch64/SME/smops-diagnostics.s @@ -67,7 +67,7 @@ // expected: .s => .b, .d => .h smops za0.s, p0/m, p0/m, z0.h, z0.b -// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction // CHECK-NEXT: smops za0.s, p0/m, p0/m, z0.h, z0.b // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME/umopa-diagnostics.s b/llvm/test/MC/AArch64/SME/umopa-diagnostics.s --- a/llvm/test/MC/AArch64/SME/umopa-diagnostics.s +++ b/llvm/test/MC/AArch64/SME/umopa-diagnostics.s @@ -67,7 +67,7 @@ // expected: .s => .b, .d => .h umopa za0.s, p0/m, p0/m, z0.h, z0.b -// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction // CHECK-NEXT: umopa za0.s, p0/m, p0/m, z0.h, z0.b // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME/umops-diagnostics.s b/llvm/test/MC/AArch64/SME/umops-diagnostics.s --- a/llvm/test/MC/AArch64/SME/umops-diagnostics.s +++ b/llvm/test/MC/AArch64/SME/umops-diagnostics.s @@ -67,7 +67,7 @@ // expected: .s => .b, .d => .h umops za0.s, p0/m, p0/m, z0.h, z0.b -// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction // CHECK-NEXT: umops za0.s, p0/m, p0/m, z0.h, z0.b // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME2/bmopa-diagnostics.s b/llvm/test/MC/AArch64/SME2/bmopa-diagnostics.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/bmopa-diagnostics.s @@ -0,0 +1,35 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s + +// --------------------------------------------------------------------------// +// Invalid tile + +bmopa za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: bmopa za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid predicate + +bmopa za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: bmopa za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +bmopa za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix) +// CHECK-NEXT: bmopa za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid suffixes + +bmopa za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s +// CHECK-NEXT: bmopa za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +bmopa za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME2/bmopa.s b/llvm/test/MC/AArch64/SME2/bmopa.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/bmopa.s @@ -0,0 +1,86 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + + +bmopa za0.s, p0/m, p0/m, z0.s, z0.s // 10000000-10000000-00000000-00001000 +// CHECK-INST: bmopa za0.s, p0/m, p0/m, z0.s, z0.s +// CHECK-ENCODING: [0x08,0x00,0x80,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80800008 + +bmopa za1.s, p5/m, p2/m, z10.s, z21.s // 10000000-10010101-01010101-01001001 +// CHECK-INST: bmopa za1.s, p5/m, p2/m, z10.s, z21.s +// CHECK-ENCODING: [0x49,0x55,0x95,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80955549 + +bmopa za3.s, p3/m, p7/m, z13.s, z8.s // 10000000-10001000-11101101-10101011 +// CHECK-INST: bmopa za3.s, p3/m, p7/m, z13.s, z8.s +// CHECK-ENCODING: [0xab,0xed,0x88,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 8088edab + +bmopa za3.s, p7/m, p7/m, z31.s, z31.s // 10000000-10011111-11111111-11101011 +// CHECK-INST: bmopa za3.s, p7/m, p7/m, z31.s, z31.s +// CHECK-ENCODING: [0xeb,0xff,0x9f,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809fffeb + +bmopa za1.s, p3/m, p0/m, z17.s, z16.s // 10000000-10010000-00001110-00101001 +// CHECK-INST: bmopa za1.s, p3/m, p0/m, z17.s, z16.s +// CHECK-ENCODING: [0x29,0x0e,0x90,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80900e29 + +bmopa za1.s, p1/m, p4/m, z1.s, z30.s // 10000000-10011110-10000100-00101001 +// CHECK-INST: bmopa za1.s, p1/m, p4/m, z1.s, z30.s +// CHECK-ENCODING: [0x29,0x84,0x9e,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809e8429 + +bmopa za0.s, p5/m, p2/m, z19.s, z20.s // 10000000-10010100-01010110-01101000 +// CHECK-INST: bmopa za0.s, p5/m, p2/m, z19.s, z20.s +// CHECK-ENCODING: [0x68,0x56,0x94,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80945668 + +bmopa za0.s, p6/m, p0/m, z12.s, z2.s // 10000000-10000010-00011001-10001000 +// CHECK-INST: bmopa za0.s, p6/m, p0/m, z12.s, z2.s +// CHECK-ENCODING: [0x88,0x19,0x82,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80821988 + +bmopa za1.s, p2/m, p6/m, z1.s, z26.s // 10000000-10011010-11001000-00101001 +// CHECK-INST: bmopa za1.s, p2/m, p6/m, z1.s, z26.s +// CHECK-ENCODING: [0x29,0xc8,0x9a,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809ac829 + +bmopa za1.s, p2/m, p0/m, z22.s, z30.s // 10000000-10011110-00001010-11001001 +// CHECK-INST: bmopa za1.s, p2/m, p0/m, z22.s, z30.s +// CHECK-ENCODING: [0xc9,0x0a,0x9e,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809e0ac9 + +bmopa za2.s, p5/m, p7/m, z9.s, z1.s // 10000000-10000001-11110101-00101010 +// CHECK-INST: bmopa za2.s, p5/m, p7/m, z9.s, z1.s +// CHECK-ENCODING: [0x2a,0xf5,0x81,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 8081f52a + +bmopa za3.s, p2/m, p5/m, z12.s, z11.s // 10000000-10001011-10101001-10001011 +// CHECK-INST: bmopa za3.s, p2/m, p5/m, z12.s, z11.s +// CHECK-ENCODING: [0x8b,0xa9,0x8b,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 808ba98b + diff --git a/llvm/test/MC/AArch64/SME2/bmops-diagnostics.s b/llvm/test/MC/AArch64/SME2/bmops-diagnostics.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/bmops-diagnostics.s @@ -0,0 +1,35 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s + +// --------------------------------------------------------------------------// +// Invalid tile + +bmops za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: bmops za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid predicate + +bmops za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: bmops za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +bmops za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix) +// CHECK-NEXT: bmops za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid suffixes + +bmops za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s +// CHECK-NEXT: bmops za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +bmops za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME2/bmops.s b/llvm/test/MC/AArch64/SME2/bmops.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/bmops.s @@ -0,0 +1,86 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + + +bmops za0.s, p0/m, p0/m, z0.s, z0.s // 10000000-10000000-00000000-00011000 +// CHECK-INST: bmops za0.s, p0/m, p0/m, z0.s, z0.s +// CHECK-ENCODING: [0x18,0x00,0x80,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80800018 + +bmops za1.s, p5/m, p2/m, z10.s, z21.s // 10000000-10010101-01010101-01011001 +// CHECK-INST: bmops za1.s, p5/m, p2/m, z10.s, z21.s +// CHECK-ENCODING: [0x59,0x55,0x95,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80955559 + +bmops za3.s, p3/m, p7/m, z13.s, z8.s // 10000000-10001000-11101101-10111011 +// CHECK-INST: bmops za3.s, p3/m, p7/m, z13.s, z8.s +// CHECK-ENCODING: [0xbb,0xed,0x88,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 8088edbb + +bmops za3.s, p7/m, p7/m, z31.s, z31.s // 10000000-10011111-11111111-11111011 +// CHECK-INST: bmops za3.s, p7/m, p7/m, z31.s, z31.s +// CHECK-ENCODING: [0xfb,0xff,0x9f,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809ffffb + +bmops za1.s, p3/m, p0/m, z17.s, z16.s // 10000000-10010000-00001110-00111001 +// CHECK-INST: bmops za1.s, p3/m, p0/m, z17.s, z16.s +// CHECK-ENCODING: [0x39,0x0e,0x90,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80900e39 + +bmops za1.s, p1/m, p4/m, z1.s, z30.s // 10000000-10011110-10000100-00111001 +// CHECK-INST: bmops za1.s, p1/m, p4/m, z1.s, z30.s +// CHECK-ENCODING: [0x39,0x84,0x9e,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809e8439 + +bmops za0.s, p5/m, p2/m, z19.s, z20.s // 10000000-10010100-01010110-01111000 +// CHECK-INST: bmops za0.s, p5/m, p2/m, z19.s, z20.s +// CHECK-ENCODING: [0x78,0x56,0x94,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80945678 + +bmops za0.s, p6/m, p0/m, z12.s, z2.s // 10000000-10000010-00011001-10011000 +// CHECK-INST: bmops za0.s, p6/m, p0/m, z12.s, z2.s +// CHECK-ENCODING: [0x98,0x19,0x82,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 80821998 + +bmops za1.s, p2/m, p6/m, z1.s, z26.s // 10000000-10011010-11001000-00111001 +// CHECK-INST: bmops za1.s, p2/m, p6/m, z1.s, z26.s +// CHECK-ENCODING: [0x39,0xc8,0x9a,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809ac839 + +bmops za1.s, p2/m, p0/m, z22.s, z30.s // 10000000-10011110-00001010-11011001 +// CHECK-INST: bmops za1.s, p2/m, p0/m, z22.s, z30.s +// CHECK-ENCODING: [0xd9,0x0a,0x9e,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 809e0ad9 + +bmops za2.s, p5/m, p7/m, z9.s, z1.s // 10000000-10000001-11110101-00111010 +// CHECK-INST: bmops za2.s, p5/m, p7/m, z9.s, z1.s +// CHECK-ENCODING: [0x3a,0xf5,0x81,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 8081f53a + +bmops za3.s, p2/m, p5/m, z12.s, z11.s // 10000000-10001011-10101001-10011011 +// CHECK-INST: bmops za3.s, p2/m, p5/m, z12.s, z11.s +// CHECK-ENCODING: [0x9b,0xa9,0x8b,0x80] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: 808ba99b + diff --git a/llvm/test/MC/AArch64/SME2/smopa-diagnostics.s b/llvm/test/MC/AArch64/SME2/smopa-diagnostics.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/smopa-diagnostics.s @@ -0,0 +1,35 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s + +// --------------------------------------------------------------------------// +// Invalid tile + +smopa za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: smopa za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid predicate + +smopa za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: smopa za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +smopa za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix) +// CHECK-NEXT: smopa za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid suffixes + +smopa za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s +// CHECK-NEXT: smopa za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +smopa za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME2/smopa.s b/llvm/test/MC/AArch64/SME2/smopa.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/smopa.s @@ -0,0 +1,86 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + + +smopa za0.s, p0/m, p0/m, z0.h, z0.h // 10100000-10000000-00000000-00001000 +// CHECK-INST: smopa za0.s, p0/m, p0/m, z0.h, z0.h +// CHECK-ENCODING: [0x08,0x00,0x80,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0800008 + +smopa za1.s, p5/m, p2/m, z10.h, z21.h // 10100000-10010101-01010101-01001001 +// CHECK-INST: smopa za1.s, p5/m, p2/m, z10.h, z21.h +// CHECK-ENCODING: [0x49,0x55,0x95,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0955549 + +smopa za3.s, p3/m, p7/m, z13.h, z8.h // 10100000-10001000-11101101-10101011 +// CHECK-INST: smopa za3.s, p3/m, p7/m, z13.h, z8.h +// CHECK-ENCODING: [0xab,0xed,0x88,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a088edab + +smopa za3.s, p7/m, p7/m, z31.h, z31.h // 10100000-10011111-11111111-11101011 +// CHECK-INST: smopa za3.s, p7/m, p7/m, z31.h, z31.h +// CHECK-ENCODING: [0xeb,0xff,0x9f,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09fffeb + +smopa za1.s, p3/m, p0/m, z17.h, z16.h // 10100000-10010000-00001110-00101001 +// CHECK-INST: smopa za1.s, p3/m, p0/m, z17.h, z16.h +// CHECK-ENCODING: [0x29,0x0e,0x90,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0900e29 + +smopa za1.s, p1/m, p4/m, z1.h, z30.h // 10100000-10011110-10000100-00101001 +// CHECK-INST: smopa za1.s, p1/m, p4/m, z1.h, z30.h +// CHECK-ENCODING: [0x29,0x84,0x9e,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09e8429 + +smopa za0.s, p5/m, p2/m, z19.h, z20.h // 10100000-10010100-01010110-01101000 +// CHECK-INST: smopa za0.s, p5/m, p2/m, z19.h, z20.h +// CHECK-ENCODING: [0x68,0x56,0x94,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0945668 + +smopa za0.s, p6/m, p0/m, z12.h, z2.h // 10100000-10000010-00011001-10001000 +// CHECK-INST: smopa za0.s, p6/m, p0/m, z12.h, z2.h +// CHECK-ENCODING: [0x88,0x19,0x82,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0821988 + +smopa za1.s, p2/m, p6/m, z1.h, z26.h // 10100000-10011010-11001000-00101001 +// CHECK-INST: smopa za1.s, p2/m, p6/m, z1.h, z26.h +// CHECK-ENCODING: [0x29,0xc8,0x9a,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09ac829 + +smopa za1.s, p2/m, p0/m, z22.h, z30.h // 10100000-10011110-00001010-11001001 +// CHECK-INST: smopa za1.s, p2/m, p0/m, z22.h, z30.h +// CHECK-ENCODING: [0xc9,0x0a,0x9e,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09e0ac9 + +smopa za2.s, p5/m, p7/m, z9.h, z1.h // 10100000-10000001-11110101-00101010 +// CHECK-INST: smopa za2.s, p5/m, p7/m, z9.h, z1.h +// CHECK-ENCODING: [0x2a,0xf5,0x81,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a081f52a + +smopa za3.s, p2/m, p5/m, z12.h, z11.h // 10100000-10001011-10101001-10001011 +// CHECK-INST: smopa za3.s, p2/m, p5/m, z12.h, z11.h +// CHECK-ENCODING: [0x8b,0xa9,0x8b,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a08ba98b + diff --git a/llvm/test/MC/AArch64/SME2/smops-diagnostics.s b/llvm/test/MC/AArch64/SME2/smops-diagnostics.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/smops-diagnostics.s @@ -0,0 +1,35 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s + +// --------------------------------------------------------------------------// +// Invalid tile + +smops za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: smops za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid predicate + +smops za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: smops za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +smops za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix) +// CHECK-NEXT: smops za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid suffixes + +smops za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s +// CHECK-NEXT: smops za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +smops za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME2/smops.s b/llvm/test/MC/AArch64/SME2/smops.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/smops.s @@ -0,0 +1,86 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + + +smops za0.s, p0/m, p0/m, z0.h, z0.h // 10100000-10000000-00000000-00011000 +// CHECK-INST: smops za0.s, p0/m, p0/m, z0.h, z0.h +// CHECK-ENCODING: [0x18,0x00,0x80,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0800018 + +smops za1.s, p5/m, p2/m, z10.h, z21.h // 10100000-10010101-01010101-01011001 +// CHECK-INST: smops za1.s, p5/m, p2/m, z10.h, z21.h +// CHECK-ENCODING: [0x59,0x55,0x95,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0955559 + +smops za3.s, p3/m, p7/m, z13.h, z8.h // 10100000-10001000-11101101-10111011 +// CHECK-INST: smops za3.s, p3/m, p7/m, z13.h, z8.h +// CHECK-ENCODING: [0xbb,0xed,0x88,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a088edbb + +smops za3.s, p7/m, p7/m, z31.h, z31.h // 10100000-10011111-11111111-11111011 +// CHECK-INST: smops za3.s, p7/m, p7/m, z31.h, z31.h +// CHECK-ENCODING: [0xfb,0xff,0x9f,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09ffffb + +smops za1.s, p3/m, p0/m, z17.h, z16.h // 10100000-10010000-00001110-00111001 +// CHECK-INST: smops za1.s, p3/m, p0/m, z17.h, z16.h +// CHECK-ENCODING: [0x39,0x0e,0x90,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0900e39 + +smops za1.s, p1/m, p4/m, z1.h, z30.h // 10100000-10011110-10000100-00111001 +// CHECK-INST: smops za1.s, p1/m, p4/m, z1.h, z30.h +// CHECK-ENCODING: [0x39,0x84,0x9e,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09e8439 + +smops za0.s, p5/m, p2/m, z19.h, z20.h // 10100000-10010100-01010110-01111000 +// CHECK-INST: smops za0.s, p5/m, p2/m, z19.h, z20.h +// CHECK-ENCODING: [0x78,0x56,0x94,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0945678 + +smops za0.s, p6/m, p0/m, z12.h, z2.h // 10100000-10000010-00011001-10011000 +// CHECK-INST: smops za0.s, p6/m, p0/m, z12.h, z2.h +// CHECK-ENCODING: [0x98,0x19,0x82,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a0821998 + +smops za1.s, p2/m, p6/m, z1.h, z26.h // 10100000-10011010-11001000-00111001 +// CHECK-INST: smops za1.s, p2/m, p6/m, z1.h, z26.h +// CHECK-ENCODING: [0x39,0xc8,0x9a,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09ac839 + +smops za1.s, p2/m, p0/m, z22.h, z30.h // 10100000-10011110-00001010-11011001 +// CHECK-INST: smops za1.s, p2/m, p0/m, z22.h, z30.h +// CHECK-ENCODING: [0xd9,0x0a,0x9e,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a09e0ad9 + +smops za2.s, p5/m, p7/m, z9.h, z1.h // 10100000-10000001-11110101-00111010 +// CHECK-INST: smops za2.s, p5/m, p7/m, z9.h, z1.h +// CHECK-ENCODING: [0x3a,0xf5,0x81,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a081f53a + +smops za3.s, p2/m, p5/m, z12.h, z11.h // 10100000-10001011-10101001-10011011 +// CHECK-INST: smops za3.s, p2/m, p5/m, z12.h, z11.h +// CHECK-ENCODING: [0x9b,0xa9,0x8b,0xa0] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a08ba99b + diff --git a/llvm/test/MC/AArch64/SME2/umopa-diagnostics.s b/llvm/test/MC/AArch64/SME2/umopa-diagnostics.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/umopa-diagnostics.s @@ -0,0 +1,35 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s + +// --------------------------------------------------------------------------// +// Invalid tile + +umopa za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: umopa za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid predicate + +umopa za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: umopa za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +umopa za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix) +// CHECK-NEXT: umopa za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid suffixes + +umopa za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s +// CHECK-NEXT: umopa za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +umopa za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME2/umopa.s b/llvm/test/MC/AArch64/SME2/umopa.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/umopa.s @@ -0,0 +1,86 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + + +umopa za0.s, p0/m, p0/m, z0.h, z0.h // 10100001-10000000-00000000-00001000 +// CHECK-INST: umopa za0.s, p0/m, p0/m, z0.h, z0.h +// CHECK-ENCODING: [0x08,0x00,0x80,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1800008 + +umopa za1.s, p5/m, p2/m, z10.h, z21.h // 10100001-10010101-01010101-01001001 +// CHECK-INST: umopa za1.s, p5/m, p2/m, z10.h, z21.h +// CHECK-ENCODING: [0x49,0x55,0x95,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1955549 + +umopa za3.s, p3/m, p7/m, z13.h, z8.h // 10100001-10001000-11101101-10101011 +// CHECK-INST: umopa za3.s, p3/m, p7/m, z13.h, z8.h +// CHECK-ENCODING: [0xab,0xed,0x88,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a188edab + +umopa za3.s, p7/m, p7/m, z31.h, z31.h // 10100001-10011111-11111111-11101011 +// CHECK-INST: umopa za3.s, p7/m, p7/m, z31.h, z31.h +// CHECK-ENCODING: [0xeb,0xff,0x9f,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19fffeb + +umopa za1.s, p3/m, p0/m, z17.h, z16.h // 10100001-10010000-00001110-00101001 +// CHECK-INST: umopa za1.s, p3/m, p0/m, z17.h, z16.h +// CHECK-ENCODING: [0x29,0x0e,0x90,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1900e29 + +umopa za1.s, p1/m, p4/m, z1.h, z30.h // 10100001-10011110-10000100-00101001 +// CHECK-INST: umopa za1.s, p1/m, p4/m, z1.h, z30.h +// CHECK-ENCODING: [0x29,0x84,0x9e,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19e8429 + +umopa za0.s, p5/m, p2/m, z19.h, z20.h // 10100001-10010100-01010110-01101000 +// CHECK-INST: umopa za0.s, p5/m, p2/m, z19.h, z20.h +// CHECK-ENCODING: [0x68,0x56,0x94,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1945668 + +umopa za0.s, p6/m, p0/m, z12.h, z2.h // 10100001-10000010-00011001-10001000 +// CHECK-INST: umopa za0.s, p6/m, p0/m, z12.h, z2.h +// CHECK-ENCODING: [0x88,0x19,0x82,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1821988 + +umopa za1.s, p2/m, p6/m, z1.h, z26.h // 10100001-10011010-11001000-00101001 +// CHECK-INST: umopa za1.s, p2/m, p6/m, z1.h, z26.h +// CHECK-ENCODING: [0x29,0xc8,0x9a,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19ac829 + +umopa za1.s, p2/m, p0/m, z22.h, z30.h // 10100001-10011110-00001010-11001001 +// CHECK-INST: umopa za1.s, p2/m, p0/m, z22.h, z30.h +// CHECK-ENCODING: [0xc9,0x0a,0x9e,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19e0ac9 + +umopa za2.s, p5/m, p7/m, z9.h, z1.h // 10100001-10000001-11110101-00101010 +// CHECK-INST: umopa za2.s, p5/m, p7/m, z9.h, z1.h +// CHECK-ENCODING: [0x2a,0xf5,0x81,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a181f52a + +umopa za3.s, p2/m, p5/m, z12.h, z11.h // 10100001-10001011-10101001-10001011 +// CHECK-INST: umopa za3.s, p2/m, p5/m, z12.h, z11.h +// CHECK-ENCODING: [0x8b,0xa9,0x8b,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a18ba98b + diff --git a/llvm/test/MC/AArch64/SME2/umops-diagnostics.s b/llvm/test/MC/AArch64/SME2/umops-diagnostics.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/umops-diagnostics.s @@ -0,0 +1,35 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s + +// --------------------------------------------------------------------------// +// Invalid tile + +umops za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: umops za8.s, p0/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid predicate + +umops za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: umops za0.s, p0/z, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +umops za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix) +// CHECK-NEXT: umops za0.s, p15/m, p0/m, z0.s, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// --------------------------------------------------------------------------// +// Invalid suffixes + +umops za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s +// CHECK-NEXT: umops za0.d, p0/z, p0/m, z0.d, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +umops za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width +// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: diff --git a/llvm/test/MC/AArch64/SME2/umops.s b/llvm/test/MC/AArch64/SME2/umops.s new file mode 100644 --- /dev/null +++ b/llvm/test/MC/AArch64/SME2/umops.s @@ -0,0 +1,86 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ +// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + + +umops za0.s, p0/m, p0/m, z0.h, z0.h // 10100001-10000000-00000000-00011000 +// CHECK-INST: umops za0.s, p0/m, p0/m, z0.h, z0.h +// CHECK-ENCODING: [0x18,0x00,0x80,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1800018 + +umops za1.s, p5/m, p2/m, z10.h, z21.h // 10100001-10010101-01010101-01011001 +// CHECK-INST: umops za1.s, p5/m, p2/m, z10.h, z21.h +// CHECK-ENCODING: [0x59,0x55,0x95,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1955559 + +umops za3.s, p3/m, p7/m, z13.h, z8.h // 10100001-10001000-11101101-10111011 +// CHECK-INST: umops za3.s, p3/m, p7/m, z13.h, z8.h +// CHECK-ENCODING: [0xbb,0xed,0x88,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a188edbb + +umops za3.s, p7/m, p7/m, z31.h, z31.h // 10100001-10011111-11111111-11111011 +// CHECK-INST: umops za3.s, p7/m, p7/m, z31.h, z31.h +// CHECK-ENCODING: [0xfb,0xff,0x9f,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19ffffb + +umops za1.s, p3/m, p0/m, z17.h, z16.h // 10100001-10010000-00001110-00111001 +// CHECK-INST: umops za1.s, p3/m, p0/m, z17.h, z16.h +// CHECK-ENCODING: [0x39,0x0e,0x90,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1900e39 + +umops za1.s, p1/m, p4/m, z1.h, z30.h // 10100001-10011110-10000100-00111001 +// CHECK-INST: umops za1.s, p1/m, p4/m, z1.h, z30.h +// CHECK-ENCODING: [0x39,0x84,0x9e,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19e8439 + +umops za0.s, p5/m, p2/m, z19.h, z20.h // 10100001-10010100-01010110-01111000 +// CHECK-INST: umops za0.s, p5/m, p2/m, z19.h, z20.h +// CHECK-ENCODING: [0x78,0x56,0x94,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1945678 + +umops za0.s, p6/m, p0/m, z12.h, z2.h // 10100001-10000010-00011001-10011000 +// CHECK-INST: umops za0.s, p6/m, p0/m, z12.h, z2.h +// CHECK-ENCODING: [0x98,0x19,0x82,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a1821998 + +umops za1.s, p2/m, p6/m, z1.h, z26.h // 10100001-10011010-11001000-00111001 +// CHECK-INST: umops za1.s, p2/m, p6/m, z1.h, z26.h +// CHECK-ENCODING: [0x39,0xc8,0x9a,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19ac839 + +umops za1.s, p2/m, p0/m, z22.h, z30.h // 10100001-10011110-00001010-11011001 +// CHECK-INST: umops za1.s, p2/m, p0/m, z22.h, z30.h +// CHECK-ENCODING: [0xd9,0x0a,0x9e,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a19e0ad9 + +umops za2.s, p5/m, p7/m, z9.h, z1.h // 10100001-10000001-11110101-00111010 +// CHECK-INST: umops za2.s, p5/m, p7/m, z9.h, z1.h +// CHECK-ENCODING: [0x3a,0xf5,0x81,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a181f53a + +umops za3.s, p2/m, p5/m, z12.h, z11.h // 10100001-10001011-10101001-10011011 +// CHECK-INST: umops za3.s, p2/m, p5/m, z12.h, z11.h +// CHECK-ENCODING: [0x9b,0xa9,0x8b,0xa1] +// CHECK-ERROR: instruction requires: sme2 +// CHECK-UNKNOWN: a18ba99b +