Skip to content

Commit 4df36f1

Browse files
[AArch64]SME2 Outer Product and Accumulate instructions
This patch adds the assembly/disassembly for the following instructions: BMOPA: Bitwise exclusive NOR population count outer product and accumulate. BMOPS: Bitwise exclusive NOR population count outer product and subtract. SMOPA (2-way): Signed integer sum of outer products and accumulate. SMOPS (2-way): Signed integer sum of outer products and subtract. UMOPA (2-way): Unsigned integer sum of outer products and accumulate. UMOPS (2-way): Signed integer sum of outer products and accumulate. The reference can be found here: https://developer.arm.com/documentation/ddi0602/2022-09 Differential Revision: https://reviews.llvm.org/D136077
1 parent f1c9ef3 commit 4df36f1

18 files changed

+778
-26
lines changed

llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ let Predicates = [HasSME] in {
5353
// Outer products
5454
//===----------------------------------------------------------------------===//
5555

56-
defm BFMOPA_MPPZZ : sme_bf16_outer_product<0b0, "bfmopa", int_aarch64_sme_mopa_wide>;
57-
defm BFMOPS_MPPZZ : sme_bf16_outer_product<0b1, "bfmops", int_aarch64_sme_mops_wide>;
56+
defm BFMOPA_MPPZZ : sme_bf16_outer_product<0b000, "bfmopa", int_aarch64_sme_mopa_wide>;
57+
defm BFMOPS_MPPZZ : sme_bf16_outer_product<0b001, "bfmops", int_aarch64_sme_mops_wide>;
5858

5959
defm FMOPA_MPPZZ_S : sme_outer_product_fp32<0b0, "fmopa", int_aarch64_sme_mopa>;
6060
defm FMOPS_MPPZZ_S : sme_outer_product_fp32<0b1, "fmops", int_aarch64_sme_mops>;
@@ -66,8 +66,8 @@ defm FMOPS_MPPZZ_D : sme_outer_product_fp64<0b1, "fmops", int_aarch64_sme_mops>;
6666
}
6767

6868
let Predicates = [HasSME] in {
69-
defm FMOPAL_MPPZZ : sme_f16_outer_product<0b0, "fmopa", int_aarch64_sme_mopa_wide>;
70-
defm FMOPSL_MPPZZ : sme_f16_outer_product<0b1, "fmops", int_aarch64_sme_mops_wide>;
69+
defm FMOPAL_MPPZZ : sme_f16_outer_product<0b010, "fmopa", int_aarch64_sme_mopa_wide>;
70+
defm FMOPSL_MPPZZ : sme_f16_outer_product<0b011, "fmops", int_aarch64_sme_mops_wide>;
7171

7272
defm SMOPA_MPPZZ_S : sme_int_outer_product_i32<0b000, "smopa", int_aarch64_sme_smopa_wide>;
7373
defm SMOPS_MPPZZ_S : sme_int_outer_product_i32<0b001, "smops", int_aarch64_sme_smops_wide>;
@@ -550,8 +550,16 @@ defm UMLSLL_VG2_M2ZZ_BtoS : sme2_mla_ll_array_vg24_single<"umlsll", 0b00110, Ma
550550
defm UMLSLL_VG4_M4ZZ_BtoS : sme2_mla_ll_array_vg24_single<"umlsll", 0b01110, MatrixOp32, ZZZZ_b, ZPR4b8>;
551551
defm UMLSLL_VG2_M2Z2Z_BtoS : sme2_mla_ll_array_vg2_multi<"umlsll", 0b0110, MatrixOp32, ZZ_b_mul_r>;
552552
defm UMLSLL_VG4_M4Z4Z_BtoS : sme2_mla_ll_array_vg4_multi<"umlsll", 0b0110, MatrixOp32, ZZZZ_b_mul_r>;
553-
}
554553

554+
defm BMOPA_MPPZZ_S : sme2_bfp_mopx_tile<"bmopa", 0b100>;
555+
defm BMOPS_MPPZZ_S : sme2_bfp_mopx_tile<"bmops", 0b101>;
556+
557+
defm SMOPA_MPPZZ_HtoS : sme2_int_mopx_tile<"smopa", 0b000>;
558+
defm SMOPS_MPPZZ_HtoS : sme2_int_mopx_tile<"smops", 0b001>;
559+
560+
defm UMOPA_MPPZZ_HtoS : sme2_int_mopx_tile<"umopa", 0b100>;
561+
defm UMOPS_MPPZZ_HtoS : sme2_int_mopx_tile<"umops", 0b101>;
562+
}
555563

556564
let Predicates = [HasSME2, HasSMEI16I64] in {
557565
defm ADD_VG2_M2ZZ_D : sme2_dot_mla_add_sub_array_vg24_single<"add", 0b1011010, MatrixOp64, ZZ_d, ZPR4b64>;

llvm/lib/Target/AArch64/SMEInstrFormats.td

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ multiclass sme_outer_product_fp64<bit S, string mnemonic, SDPatternOperator op>
8787
(!cast<Instruction>(NAME # _PSEUDO) imm0_7:$tile, $pn, $pm, $zn, $zm)>;
8888
}
8989

90-
class sme_int_outer_product_inst<bit u0, bit u1, bit S, bit sz,
90+
class sme_int_outer_product_inst<bits<3> opc, bit sz, bit sme2,
9191
MatrixTileOperand za_ty, ZPRRegOp zpr_ty,
9292
string mnemonic>
9393
: I<(outs za_ty:$ZAda),
@@ -100,23 +100,23 @@ class sme_int_outer_product_inst<bit u0, bit u1, bit S, bit sz,
100100
bits<3> Pn;
101101
bits<5> Zn;
102102
let Inst{31-25} = 0b1010000;
103-
let Inst{24} = u0;
103+
let Inst{24} = opc{2}; // u0
104104
let Inst{23} = 0b1;
105105
let Inst{22} = sz;
106-
let Inst{21} = u1;
106+
let Inst{21} = opc{1}; // u1
107107
let Inst{20-16} = Zm;
108108
let Inst{15-13} = Pm;
109109
let Inst{12-10} = Pn;
110110
let Inst{9-5} = Zn;
111-
let Inst{4} = S;
112-
let Inst{3} = 0b0;
111+
let Inst{4} = opc{0}; //S;
112+
let Inst{3} = sme2;
113113

114114
let Constraints = "$ZAda = $_ZAda";
115115
}
116116

117117
multiclass sme_int_outer_product_i32<bits<3> opc, string mnemonic,
118118
SDPatternOperator op> {
119-
def NAME : sme_int_outer_product_inst<opc{2}, opc{1}, opc{0}, 0b0, TileOp32,
119+
def NAME : sme_int_outer_product_inst<opc, 0b0, 0b0, TileOp32,
120120
ZPR8, mnemonic> {
121121
bits<2> ZAda;
122122
let Inst{1-0} = ZAda;
@@ -132,7 +132,7 @@ multiclass sme_int_outer_product_i32<bits<3> opc, string mnemonic,
132132

133133
multiclass sme_int_outer_product_i64<bits<3> opc, string mnemonic,
134134
SDPatternOperator op> {
135-
def NAME : sme_int_outer_product_inst<opc{2}, opc{1}, opc{0}, 0b1, TileOp64,
135+
def NAME : sme_int_outer_product_inst<opc, 0b1, 0b0, TileOp64,
136136
ZPR16, mnemonic> {
137137
bits<3> ZAda;
138138
let Inst{2-0} = ZAda;
@@ -145,9 +145,9 @@ multiclass sme_int_outer_product_i64<bits<3> opc, string mnemonic,
145145
(!cast<Instruction>(NAME # _PSEUDO) imm0_7:$tile, $pn, $pm, $zn, $zm)>;
146146
}
147147

148-
class sme_outer_product_widening_inst<bit op, bit S, string mnemonic>
148+
class sme_outer_product_widening_inst<bits<3> opc, ZPRRegOp zpr_ty, string mnemonic>
149149
: I<(outs TileOp32:$ZAda),
150-
(ins TileOp32:$_ZAda, PPR3bAny:$Pn, PPR3bAny:$Pm, ZPR16:$Zn, ZPR16:$Zm),
150+
(ins TileOp32:$_ZAda, PPR3bAny:$Pn, PPR3bAny:$Pm, zpr_ty:$Zn, zpr_ty:$Zm),
151151
mnemonic, "\t$ZAda, $Pn/m, $Pm/m, $Zn, $Zm",
152152
"", []>,
153153
Sched<[]> {
@@ -156,21 +156,24 @@ class sme_outer_product_widening_inst<bit op, bit S, string mnemonic>
156156
bits<3> Pn;
157157
bits<5> Zn;
158158
bits<2> ZAda;
159-
let Inst{31-22} = 0b1000000110;
160-
let Inst{21} = op;
159+
let Inst{31-25} = 0b1000000;
160+
let Inst{24} = !if(opc{2}, 0, 1);
161+
let Inst{23-22} = 0b10;
162+
let Inst{21} = opc{1};
161163
let Inst{20-16} = Zm;
162164
let Inst{15-13} = Pm;
163165
let Inst{12-10} = Pn;
164166
let Inst{9-5} = Zn;
165-
let Inst{4} = S;
166-
let Inst{3-2} = 0b00;
167+
let Inst{4} = opc{0};
168+
let Inst{3} = opc{2};
169+
let Inst{2} = 0b0;
167170
let Inst{1-0} = ZAda;
168171

169172
let Constraints = "$ZAda = $_ZAda";
170173
}
171174

172-
multiclass sme_bf16_outer_product<bit S, string mnemonic, SDPatternOperator op> {
173-
def NAME : sme_outer_product_widening_inst<0b0, S, mnemonic>;
175+
multiclass sme_bf16_outer_product<bits<3> opc, string mnemonic, SDPatternOperator op> {
176+
def NAME : sme_outer_product_widening_inst<opc, ZPR16, mnemonic>;
174177

175178
def NAME # _PSEUDO : sme_outer_product_pseudo<ZPR16>;
176179

@@ -179,8 +182,8 @@ multiclass sme_bf16_outer_product<bit S, string mnemonic, SDPatternOperator op>
179182
(!cast<Instruction>(NAME # _PSEUDO) imm0_3:$tile, $pn, $pm, $zn, $zm)>;
180183
}
181184

182-
multiclass sme_f16_outer_product<bit S, string mnemonic, SDPatternOperator op> {
183-
def NAME : sme_outer_product_widening_inst<0b1, S, mnemonic>;
185+
multiclass sme_f16_outer_product<bits<3> opc, string mnemonic, SDPatternOperator op> {
186+
def NAME : sme_outer_product_widening_inst<opc, ZPR16, mnemonic>;
184187

185188
def NAME # _PSEUDO : sme_outer_product_pseudo<ZPR16>;
186189

@@ -2361,3 +2364,18 @@ multiclass sme2_mla_ll_array_vg4_multi<string mnemonic, bits<4> op,
23612364
def : InstAlias<mnemonic # "\t$ZAda[$Rv, $imm], $Zn, $Zm",
23622365
(!cast<Instruction>(NAME) matrix_ty:$ZAda, MatrixIndexGPR32Op8_11:$Rv, uimm1s4range:$imm, vector_ty:$Zn, vector_ty:$Zm), 0>;
23632366
}
2367+
2368+
//===----------------------------------------------------------------------===//
2369+
// SME2 Outer Product and Accumulate
2370+
2371+
multiclass sme2_int_mopx_tile<string mnemonic, bits<3> op> {
2372+
def NAME : sme_int_outer_product_inst<op, 0b0, 0b1, TileOp32, ZPR16, mnemonic> {
2373+
bits<2> ZAda;
2374+
let Inst{1-0} = ZAda;
2375+
let Inst{2} = 0b0;
2376+
}
2377+
}
2378+
2379+
multiclass sme2_bfp_mopx_tile<string mnemonic, bits<3> op> {
2380+
def NAME : sme_outer_product_widening_inst<op, ZPR32, mnemonic>;
2381+
}

llvm/test/MC/AArch64/SME/smopa-diagnostics.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ smopa za0.d, p0/m, p0/z, z0.h, z0.h
6767
// expected: .s => .b, .d => .h
6868

6969
smopa za0.s, p0/m, p0/m, z0.h, z0.b
70-
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
70+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
7171
// CHECK-NEXT: smopa za0.s, p0/m, p0/m, z0.h, z0.b
7272
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
7373

llvm/test/MC/AArch64/SME/smops-diagnostics.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ smops za0.d, p0/m, p0/z, z0.h, z0.h
6767
// expected: .s => .b, .d => .h
6868

6969
smops za0.s, p0/m, p0/m, z0.h, z0.b
70-
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
70+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
7171
// CHECK-NEXT: smops za0.s, p0/m, p0/m, z0.h, z0.b
7272
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
7373

llvm/test/MC/AArch64/SME/umopa-diagnostics.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ umopa za0.d, p0/m, p0/z, z0.h, z0.h
6767
// expected: .s => .b, .d => .h
6868

6969
umopa za0.s, p0/m, p0/m, z0.h, z0.b
70-
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
70+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
7171
// CHECK-NEXT: umopa za0.s, p0/m, p0/m, z0.h, z0.b
7272
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
7373

llvm/test/MC/AArch64/SME/umops-diagnostics.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ umops za0.d, p0/m, p0/z, z0.h, z0.h
6767
// expected: .s => .b, .d => .h
6868

6969
umops za0.s, p0/m, p0/m, z0.h, z0.b
70-
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
70+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
7171
// CHECK-NEXT: umops za0.s, p0/m, p0/m, z0.h, z0.b
7272
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
7373

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s
2+
3+
// --------------------------------------------------------------------------//
4+
// Invalid tile
5+
6+
bmopa za8.s, p0/m, p0/m, z0.s, z0.s
7+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
8+
// CHECK-NEXT: bmopa za8.s, p0/m, p0/m, z0.s, z0.s
9+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10+
11+
// --------------------------------------------------------------------------//
12+
// Invalid predicate
13+
14+
bmopa za0.s, p0/z, p0/m, z0.s, z0.s
15+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
16+
// CHECK-NEXT: bmopa za0.s, p0/z, p0/m, z0.s, z0.s
17+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18+
19+
bmopa za0.s, p15/m, p0/m, z0.s, z0.s
20+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
21+
// CHECK-NEXT: bmopa za0.s, p15/m, p0/m, z0.s, z0.s
22+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
23+
24+
// --------------------------------------------------------------------------//
25+
// Invalid suffixes
26+
27+
bmopa za0.d, p0/z, p0/m, z0.d, z0.d
28+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s
29+
// CHECK-NEXT: bmopa za0.d, p0/z, p0/m, z0.d, z0.d
30+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31+
32+
bmopa za0.s, p0/m, p0/m, z0.s, z0.d
33+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
34+
// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d
35+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

llvm/test/MC/AArch64/SME2/bmopa.s

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \
2+
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3+
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4+
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
5+
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \
6+
// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST
7+
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \
8+
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9+
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \
10+
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
11+
// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \
12+
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
13+
14+
15+
bmopa za0.s, p0/m, p0/m, z0.s, z0.s // 10000000-10000000-00000000-00001000
16+
// CHECK-INST: bmopa za0.s, p0/m, p0/m, z0.s, z0.s
17+
// CHECK-ENCODING: [0x08,0x00,0x80,0x80]
18+
// CHECK-ERROR: instruction requires: sme2
19+
// CHECK-UNKNOWN: 80800008 <unknown>
20+
21+
bmopa za1.s, p5/m, p2/m, z10.s, z21.s // 10000000-10010101-01010101-01001001
22+
// CHECK-INST: bmopa za1.s, p5/m, p2/m, z10.s, z21.s
23+
// CHECK-ENCODING: [0x49,0x55,0x95,0x80]
24+
// CHECK-ERROR: instruction requires: sme2
25+
// CHECK-UNKNOWN: 80955549 <unknown>
26+
27+
bmopa za3.s, p3/m, p7/m, z13.s, z8.s // 10000000-10001000-11101101-10101011
28+
// CHECK-INST: bmopa za3.s, p3/m, p7/m, z13.s, z8.s
29+
// CHECK-ENCODING: [0xab,0xed,0x88,0x80]
30+
// CHECK-ERROR: instruction requires: sme2
31+
// CHECK-UNKNOWN: 8088edab <unknown>
32+
33+
bmopa za3.s, p7/m, p7/m, z31.s, z31.s // 10000000-10011111-11111111-11101011
34+
// CHECK-INST: bmopa za3.s, p7/m, p7/m, z31.s, z31.s
35+
// CHECK-ENCODING: [0xeb,0xff,0x9f,0x80]
36+
// CHECK-ERROR: instruction requires: sme2
37+
// CHECK-UNKNOWN: 809fffeb <unknown>
38+
39+
bmopa za1.s, p3/m, p0/m, z17.s, z16.s // 10000000-10010000-00001110-00101001
40+
// CHECK-INST: bmopa za1.s, p3/m, p0/m, z17.s, z16.s
41+
// CHECK-ENCODING: [0x29,0x0e,0x90,0x80]
42+
// CHECK-ERROR: instruction requires: sme2
43+
// CHECK-UNKNOWN: 80900e29 <unknown>
44+
45+
bmopa za1.s, p1/m, p4/m, z1.s, z30.s // 10000000-10011110-10000100-00101001
46+
// CHECK-INST: bmopa za1.s, p1/m, p4/m, z1.s, z30.s
47+
// CHECK-ENCODING: [0x29,0x84,0x9e,0x80]
48+
// CHECK-ERROR: instruction requires: sme2
49+
// CHECK-UNKNOWN: 809e8429 <unknown>
50+
51+
bmopa za0.s, p5/m, p2/m, z19.s, z20.s // 10000000-10010100-01010110-01101000
52+
// CHECK-INST: bmopa za0.s, p5/m, p2/m, z19.s, z20.s
53+
// CHECK-ENCODING: [0x68,0x56,0x94,0x80]
54+
// CHECK-ERROR: instruction requires: sme2
55+
// CHECK-UNKNOWN: 80945668 <unknown>
56+
57+
bmopa za0.s, p6/m, p0/m, z12.s, z2.s // 10000000-10000010-00011001-10001000
58+
// CHECK-INST: bmopa za0.s, p6/m, p0/m, z12.s, z2.s
59+
// CHECK-ENCODING: [0x88,0x19,0x82,0x80]
60+
// CHECK-ERROR: instruction requires: sme2
61+
// CHECK-UNKNOWN: 80821988 <unknown>
62+
63+
bmopa za1.s, p2/m, p6/m, z1.s, z26.s // 10000000-10011010-11001000-00101001
64+
// CHECK-INST: bmopa za1.s, p2/m, p6/m, z1.s, z26.s
65+
// CHECK-ENCODING: [0x29,0xc8,0x9a,0x80]
66+
// CHECK-ERROR: instruction requires: sme2
67+
// CHECK-UNKNOWN: 809ac829 <unknown>
68+
69+
bmopa za1.s, p2/m, p0/m, z22.s, z30.s // 10000000-10011110-00001010-11001001
70+
// CHECK-INST: bmopa za1.s, p2/m, p0/m, z22.s, z30.s
71+
// CHECK-ENCODING: [0xc9,0x0a,0x9e,0x80]
72+
// CHECK-ERROR: instruction requires: sme2
73+
// CHECK-UNKNOWN: 809e0ac9 <unknown>
74+
75+
bmopa za2.s, p5/m, p7/m, z9.s, z1.s // 10000000-10000001-11110101-00101010
76+
// CHECK-INST: bmopa za2.s, p5/m, p7/m, z9.s, z1.s
77+
// CHECK-ENCODING: [0x2a,0xf5,0x81,0x80]
78+
// CHECK-ERROR: instruction requires: sme2
79+
// CHECK-UNKNOWN: 8081f52a <unknown>
80+
81+
bmopa za3.s, p2/m, p5/m, z12.s, z11.s // 10000000-10001011-10101001-10001011
82+
// CHECK-INST: bmopa za3.s, p2/m, p5/m, z12.s, z11.s
83+
// CHECK-ENCODING: [0x8b,0xa9,0x8b,0x80]
84+
// CHECK-ERROR: instruction requires: sme2
85+
// CHECK-UNKNOWN: 808ba98b <unknown>
86+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 2>&1 < %s | FileCheck %s
2+
3+
// --------------------------------------------------------------------------//
4+
// Invalid tile
5+
6+
bmops za8.s, p0/m, p0/m, z0.s, z0.s
7+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
8+
// CHECK-NEXT: bmops za8.s, p0/m, p0/m, z0.s, z0.s
9+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10+
11+
// --------------------------------------------------------------------------//
12+
// Invalid predicate
13+
14+
bmops za0.s, p0/z, p0/m, z0.s, z0.s
15+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
16+
// CHECK-NEXT: bmops za0.s, p0/z, p0/m, z0.s, z0.s
17+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
18+
19+
bmops za0.s, p15/m, p0/m, z0.s, z0.s
20+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
21+
// CHECK-NEXT: bmops za0.s, p15/m, p0/m, z0.s, z0.s
22+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
23+
24+
// --------------------------------------------------------------------------//
25+
// Invalid suffixes
26+
27+
bmops za0.d, p0/z, p0/m, z0.d, z0.d
28+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3].s
29+
// CHECK-NEXT: bmops za0.d, p0/z, p0/m, z0.d, z0.d
30+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31+
32+
bmops za0.s, p0/m, p0/m, z0.s, z0.d
33+
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
34+
// CHECK-NEXT: za0.s, p0/m, p0/m, z0.s, z0.d
35+
// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

0 commit comments

Comments
 (0)