Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / SME / st1b-diagnostics.s
blob05ac2301041ff37ac16269e0fd64a4cf104fd325
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme 2>&1 < %s| FileCheck %s
3 // ------------------------------------------------------------------------- //
4 // Invalid tile (expected: za0h.b or za0v.b)
6 st1b {za1h.b[w12, 0]}, p0, [x0]
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: unexpected token in argument list
8 // CHECK-NEXT: st1b {za1h.b[w12, 0]}, p0, [x0]
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 st1b {za[w12, 0]}, p0/z, [x0]
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za0h.b or za0v.b
13 // CHECK-NEXT: st1b {za[w12, 0]}, p0/z, [x0]
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 st1b {za15v.q[w12, 0]}, p0/z, [x0]
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za0h.b or za0v.b
18 // CHECK-NEXT: st1b {za15v.q[w12, 0]}, p0/z, [x0]
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 // ------------------------------------------------------------------------- //
22 // Invalid vector select register (expected: w12-w15)
24 st1b {za0h.b[w11, 0]}, p0, [x0]
25 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must be a register in range [w12, w15]
26 // CHECK-NEXT: st1b {za0h.b[w11, 0]}, p0, [x0]
27 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29 st1b {za0h.b[w16, 0]}, p0, [x0]
30 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must be a register in range [w12, w15]
31 // CHECK-NEXT: st1b {za0h.b[w16, 0]}, p0, [x0]
32 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34 // ------------------------------------------------------------------------- //
35 // Invalid vector select offset (expected: 0-15)
37 st1b {za0h.b[w12]}, p0, [x0]
38 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15].
39 // CHECK-NEXT: st1b {za0h.b[w12]}, p0, [x0]
40 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
42 st1b {za0h.b[w12, 16]}, p0, [x0]
43 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15].
44 // CHECK-NEXT: st1b {za0h.b[w12, 16]}, p0, [x0]
45 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
47 // ------------------------------------------------------------------------- //
48 // Invalid predicate (expected: p0-p7)
50 st1b {za0h.b[w12, 0]}, p8, [x0]
51 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
52 // CHECK-NEXT: st1b {za0h.b[w12, 0]}, p8, [x0]
53 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
55 // ------------------------------------------------------------------------- //
56 // Unexpected predicate qualifier
58 st1b {za0h.b[w12, 0]}, p0/z, [x0]
59 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
60 // CHECK-NEXT: st1b {za0h.b[w12, 0]}, p0/z, [x0]
61 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
63 st1b {za0h.b[w12, 0]}, p0/m, [x0]
64 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
65 // CHECK-NEXT: st1b {za0h.b[w12, 0]}, p0/m, [x0]
66 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
68 // ------------------------------------------------------------------------- //
69 // Invalid memory operands
71 st1b {za0h.b[w12, 0]}, p0, [w0]
72 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
73 // CHECK-NEXT: st1b {za0h.b[w12, 0]}, p0, [w0]
74 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
76 st1b {za0h.b[w12, 0]}, p0, [x0, w0]
77 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 or xzr, without shift
78 // CHECK-NEXT: st1b {za0h.b[w12, 0]}, p0, [x0, w0]
79 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
81 st1b {za0h.b[w12, 0]}, p0, [x0, x0, lsl #1]
82 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: register must be x0..x30 or xzr, without shift
83 // CHECK-NEXT: st1b {za0h.b[w12, 0]}, p0, [x0, x0, lsl #1]
84 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: