1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sme2
2>&1 < %s | FileCheck
%s
3 // --------------------------------------------------------------------------//
4 // Multi-vector sequence constraints
6 mova
{z1.d-z2.d
}, za.d
[w12
]
7 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: Invalid vector list
, expected list with
2 consecutive SVE vectors
, where the first vector is
a multiple of
2 and with matching element types
8 // CHECK-NEXT
: mova
{z1.d-z2.d
}, za.d
[w12
]
9 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
11 mova
{z1.d-z4.d
}, za.d
[w12
]
12 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: Invalid vector list
, expected list with
4 consecutive SVE vectors
, where the first vector is
a multiple of
4 and with matching element types
13 // CHECK-NEXT
: mova
{z1.d-z4.d
}, za.d
[w12
]
14 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
16 // --------------------------------------------------------------------------//
17 // Invalid index offset
19 mova
{z0.s
, z1.s
}, za0h.s
[w12
, 1:2]
20 // 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, 2], and the second immediate is immf
+ 1.
21 // CHECK-NEXT
: mova
{z0.s
, z1.s
}, za0h.s
[w12
, 1:2]
22 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
24 mova
{z0.s
, z1.s
}, za0h.s
[w12
, 3:4]
25 // 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, 2], and the second immediate is immf
+ 1.
26 // CHECK-NEXT
: mova
{z0.s
, z1.s
}, za0h.s
[w12
, 3:4]
27 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
29 mova
{z0.s
, z1.s
}, za0h.s
[w12
, 0:2]
30 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
31 // CHECK-NEXT
: mova
{z0.s
, z1.s
}, za0h.s
[w12
, 0:2]
32 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
34 mova
{z20.d-z21.d
}, za2h.d
[w14
, 0:3]
35 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
36 // CHECK-NEXT
: mova
{z20.d-z21.d
}, za2h.d
[w14
, 0:3]
37 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
39 mova
{z16.s-z19.s
}, za1h.s
[w14
, 0:1]
40 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
41 // CHECK-NEXT
: mova
{z16.s-z19.s
}, za1h.s
[w14
, 0:1]
42 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
44 // --------------------------------------------------------------------------//
45 // Invalid index
(expected range
)
47 mova
{z0.b-z3.
b}, za0h.
b[w13
, 0]
48 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
49 // CHECK-NEXT
: mova
{z0.b-z3.
b}, za0h.
b[w13
, 0]
50 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
52 // --------------------------------------------------------------------------//
53 // Operands are
not consistent
55 mova za.h
[w8
, 0], {z0.s-z3.s
}
56 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
57 // CHECK-NEXT
: mova za.h
[w8
, 0], {z0.s-z3.s
}
58 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
60 mov za.h
[w8
, 0], {z0.s-z3.s
}
61 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
62 // CHECK-NEXT
:mov za.h
[w8
, 0], {z0.s-z3.s
}
63 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
65 mova
{z0.s-z3.s
}, za.
b[w8
, 0]
66 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid matrix operand
, expected suffix
.s
67 // CHECK-NEXT
: mova
{z0.s-z3.s
}, za.
b[w8
, 0]
68 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
70 mov
{z0.h-z3.h
}, za.d
[w8
, 0]
71 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid matrix operand
, expected suffix
.h
72 // CHECK-NEXT
: mov
{z0.h-z3.h
}, za.d
[w8
, 0]
73 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
76 // --------------------------------------------------------------------------//
77 // Tile-to-vector
and vector-to-tile should
not accept the VG suffix
79 mov za0h.
b[w12
, 0:1, vgx2
], { z0.
b, z1.
b }
80 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
81 // CHECK-NEXT
: mov za0h.
b[w12
, 0:1, vgx2
], { z0.
b, z1.
b }
82 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
84 mov
{ z0.
b, z1.
b }, za0h.
b[w12
, 0:1, vgx2
]
85 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
86 // CHECK-NEXT
: mov
{ z0.
b, z1.
b }, za0h.
b[w12
, 0:1, vgx2
]
87 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
89 mov za0h.
b[w12
, 0:3, vgx4
], { z0.
b - z3.
b }
90 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
91 // CHECK-NEXT
: mov za0h.
b[w12
, 0:3, vgx4
], { z0.
b - z3.
b }
92 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
94 mov
{ z0.
b - z3.
b }, za0h.
b[w12
, 0:3, vgx4
]
95 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
96 // CHECK-NEXT
: mov
{ z0.
b - z3.
b }, za0h.
b[w12
, 0:3, vgx4
]
97 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
99 mova za0h.
b[w12
, 0:1, vgx2
], { z0.
b, z1.
b }
100 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
101 // CHECK-NEXT
: mova za0h.
b[w12
, 0:1, vgx2
], { z0.
b, z1.
b }
102 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
104 mova
{ z0.
b, z1.
b }, za0h.
b[w12
, 0:1, vgx2
]
105 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
106 // CHECK-NEXT
: mova
{ z0.
b, z1.
b }, za0h.
b[w12
, 0:1, vgx2
]
107 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
109 mova za0h.
b[w12
, 0:3, vgx4
], { z0.
b - z3.
b }
110 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
111 // CHECK-NEXT
: mova za0h.
b[w12
, 0:3, vgx4
], { z0.
b - z3.
b }
112 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
114 mova
{ z0.
b - z3.
b }, za0h.
b[w12
, 0:3, vgx4
]
115 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
116 // CHECK-NEXT
: mova
{ z0.
b - z3.
b }, za0h.
b[w12
, 0:3, vgx4
]
117 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: