[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / MC / AArch64 / SME2p1 / movaz-diagnostics.s
blob2b6bc03d7f3bb3495311909255513acfc493c15f
1 // RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p1 2>&1 < %s | FileCheck %s
3 // --------------------------------------------------------------------------//
4 // Out of range index offset
6 movaz {z0.h-z1.h}, za0h.h[w12, 1:2]
7 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector select offset must be an immediate range of the form <immf>:<imml>, where the first immediate is a multiple of 2 in the range [0, 6] or [0, 14] depending on the instruction, and the second immediate is immf + 1.
8 // CHECK-NEXT: movaz {z0.h-z1.h}, za0h.h[w12, 1:2]
9 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11 movaz {z0.b-z3.b}, za0v.b[w12, 1:4]
12 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector select offset must be an immediate range of the form <immf>:<imml>, where the first immediate is a multiple of 4 in the range [0, 4] or [0, 12] depending on the instruction, and the second immediate is immf + 3.
13 // CHECK-NEXT: movaz {z0.b-z3.b}, za0v.b[w12, 1:4]
14 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16 movaz {z0.s-z1.s}, za0h.s[w12, 0:2]
17 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
18 // CHECK-NEXT: movaz {z0.s-z1.s}, za0h.s[w12, 0:2]
19 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21 movaz {z0.d-z3.d}, za0h.d[w12, 0:4]
22 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
23 // CHECK-NEXT: movaz {z0.d-z3.d}, za0h.d[w12, 0:4]
24 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26 movaz {z4.d-z7.d}, za.d[w9, 8]
27 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7].
28 // CHECK-NEXT: movaz {z4.d-z7.d}, za.d[w9, 8]
29 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31 movaz {z4.d-z7.d}, za.d[w9, -1]
32 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7].
33 // CHECK-NEXT: movaz {z4.d-z7.d}, za.d[w9, -1]
34 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
36 movaz z1.q, za1h.q[w12, 1]
37 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be 0.
38 // CHECK-NEXT: movaz z1.q, za1h.q[w12, 1]
39 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
41 movaz z31.h, za1h.h[w15, 8]
42 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7].
43 // CHECK-NEXT: movaz z31.h, za1h.h[w15, 8]
44 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
46 movaz z31.h, za1h.h[w15, -1]
47 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7].
48 // CHECK-NEXT: movaz z31.h, za1h.h[w15, -1]
49 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
51 movaz z2.b, za0v.b[w15, -1]
52 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15].
53 // CHECK-NEXT: movaz z2.b, za0v.b[w15, -1]
54 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
56 movaz z2.b, za0v.b[w15, 16]
57 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15].
58 // CHECK-NEXT: movaz z2.b, za0v.b[w15, 16]
59 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
61 movaz z31.s, za1h.s[w15, 4]
62 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 3].
63 // CHECK-NEXT: movaz z31.s, za1h.s[w15, 4]
64 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
66 movaz z31.s, za1h.s[w15, -1]
67 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 3].
68 // CHECK-NEXT: movaz z31.s, za1h.s[w15, -1]
69 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
71 movaz z31.d, za1v.d[w15, 2]
72 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 1].
73 // CHECK-NEXT: movaz z31.d, za1v.d[w15, 2]
74 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
76 movaz z31.d, za1h.d[w15, -1]
77 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 1].
78 // CHECK-NEXT: movaz z31.d, za1h.d[w15, -1]
79 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
81 // --------------------------------------------------------------------------//
82 // Invalid vector select register
84 movaz z0.h, za0v.h[w11, 0]
85 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must be a register in range [w12, w15]
86 // CHECK-NEXT: movaz z0.h, za0v.h[w11, 0]
87 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
89 movaz z0.h, za0v.h[w16, 0]
90 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: operand must be a register in range [w12, w15]
91 // CHECK-NEXT: movaz z0.h, za0v.h[w16, 0]
92 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
94 // --------------------------------------------------------------------------//
95 // Invalid matrix operand
97 movaz z31.s, za1h.d[w15, -1]
98 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid matrix operand, expected za[0-3]h.s or za[0-3]v.s
99 // CHECK-NEXT: movaz z31.s, za1h.d[w15, -1]
100 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
102 // --------------------------------------------------------------------------//
103 // Tile-to-vector should not accept the VG suffix
105 movaz { z0.b, z1.b }, za0h.b[w12, 0:1, vgx2]
106 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
107 // CHECK-NEXT: movaz { z0.b, z1.b }, za0h.b[w12, 0:1, vgx2]
108 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
110 movaz { z0.b - z3.b }, za0h.b[w12, 0:3, vgx4]
111 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
112 // CHECK-NEXT: movaz { z0.b - z3.b }, za0h.b[w12, 0:3, vgx4]
113 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: