1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
2>&1 < %s| FileCheck
%s
4 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 8]
5 // CHECK-NEXT
: asr z30.
b, z10.
b, #0
6 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
9 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 8]
10 // CHECK-NEXT
: asr z18.
b, z27.
b, #9
11 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
13 asr z18.
b, p0
/m
, z28.
b, #0
14 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 8]
15 // CHECK-NEXT
: asr z18.
b, p0
/m
, z28.
b, #0
16 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
18 asr z1.
b, p0
/m
, z9.
b, #9
19 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 8]
20 // CHECK-NEXT
: asr z1.
b, p0
/m
, z9.
b, #9
21 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
24 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 16]
25 // CHECK-NEXT
: asr z26.h
, z4.h
, #0
26 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
29 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 16]
30 // CHECK-NEXT
: asr z25.h
, z10.h
, #17
31 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
33 asr z21.h
, p0
/m
, z2.h
, #0
34 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 16]
35 // CHECK-NEXT
: asr z21.h
, p0
/m
, z2.h
, #0
36 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
38 asr z14.h
, p0
/m
, z30.h
, #17
39 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 16]
40 // CHECK-NEXT
: asr z14.h
, p0
/m
, z30.h
, #17
41 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
44 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 32]
45 // CHECK-NEXT
: asr z17.s
, z0.s
, #0
46 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
49 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 32]
50 // CHECK-NEXT
: asr z0.s
, z15.s
, #33
51 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
53 asr z6.s
, p0
/m
, z12.s
, #0
54 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 32]
55 // CHECK-NEXT
: asr z6.s
, p0
/m
, z12.s
, #0
56 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
58 asr z23.s
, p0
/m
, z19.s
, #33
59 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 32]
60 // CHECK-NEXT
: asr z23.s
, p0
/m
, z19.s
, #33
61 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
64 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 64]
65 // CHECK-NEXT
: asr z4.d
, z13.d
, #0
66 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
69 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 64]
70 // CHECK-NEXT
: asr z26.d
, z26.d
, #65
71 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
73 asr z3.d
, p0
/m
, z24.d
, #0
74 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 64]
75 // CHECK-NEXT
: asr z3.d
, p0
/m
, z24.d
, #0
76 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
78 asr z25.d
, p0
/m
, z16.d
, #65
79 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 64]
80 // CHECK-NEXT
: asr z25.d
, p0
/m
, z16.d
, #65
81 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
84 // --------------------------------------------------------------------------//
85 // Source
and Destination Registers must match
87 asr z0.
b, p0
/m
, z1.
b, z2.
b
88 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: operand must match destination register
89 // CHECK-NEXT
: asr z0.
b, p0
/m
, z1.
b, z2.
b
90 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
92 asr z0.
b, p0
/m
, z1.
b, #1
93 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: operand must match destination register
94 // CHECK-NEXT
: asr z0.
b, p0
/m
, z1.
b, #1
95 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
98 // --------------------------------------------------------------------------//
99 // Element sizes must match
102 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
103 // CHECK-NEXT
: asr z0.
b, z0.d
, z1.d
104 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
106 asr z0.
b, p0
/m
, z0.d
, z1.d
107 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
108 // CHECK-NEXT
: asr z0.
b, p0
/m
, z0.d
, z1.d
109 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
111 asr z0.
b, p0
/m
, z0.
b, z1.h
112 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
113 // CHECK-NEXT
: asr z0.
b, p0
/m
, z0.
b, z1.h
114 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
117 // --------------------------------------------------------------------------//
118 // Predicate
not in restricted predicate range
120 asr z0.
b, p8
/m
, z0.
b, z1.
b
121 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
122 // CHECK-NEXT
: asr z0.
b, p8
/m
, z0.
b, z1.
b
123 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
127 // --------------------------------------------------------------------------//
128 // Negative tests for instructions that are incompatible with movprfx
130 movprfx z31.d
, p0
/z
, z6.d
131 asr z31.d
, z31.d
, #64
132 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
133 // CHECK-NEXT
: asr z31.d
, z31.d
, #64
134 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
137 asr z31.d
, z31.d
, #64
138 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
139 // CHECK-NEXT
: asr z31.d
, z31.d
, #64
140 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
142 movprfx z0.s
, p0
/z
, z7.s
144 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
145 // CHECK-NEXT
: asr z0.s
, z1.s
, z2.d
146 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
150 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
151 // CHECK-NEXT
: asr z0.s
, z1.s
, z2.d
152 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: