1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
2>&1 < %s| FileCheck
%s
3 // Register z32 does
not exist.
4 sqadd z22.h
, z10.h
, z32.h
5 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand
6 // CHECK-NEXT
: sqadd z22.h
, z10.h
, z32.h
7 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
9 // Invalid element kind.
10 sqadd z20.h
, z2.h
, z31.x
11 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid vector kind qualifier
12 // CHECK-NEXT
: sqadd z20.h
, z2.h
, z31.x
13 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
15 // Element size specifiers should match.
16 sqadd z27.h
, z11.h
, z27.
b
17 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
18 // CHECK-NEXT
: sqadd z27.h
, z11.h
, z27.
b
19 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
22 // --------------------------------------------------------------------------//
25 sqadd z0.
b, z0.
b, #0, lsl #8 // #0, lsl #8 is not valid for .b
26 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] with
a shift amount of
0
27 // CHECK-NEXT
: sqadd z0.
b, z0.
b, #0, lsl #8
28 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
31 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] with
a shift amount of
0
32 // CHECK-NEXT
: sqadd z0.
b, z0.
b, #-1
33 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
35 sqadd z0.
b, z0.
b, #1, lsl #8
36 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] with
a shift amount of
0
37 // CHECK-NEXT
: sqadd z0.
b, z0.
b, #1, lsl #8
38 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
40 sqadd z0.
b, z0.
b, #256
41 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] with
a shift amount of
0
42 // CHECK-NEXT
: sqadd z0.
b, z0.
b, #256
43 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
46 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
47 // CHECK-NEXT
: sqadd z0.h
, z0.h
, #-1
48 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
50 sqadd z0.h
, z0.h
, #256, lsl #8
51 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
52 // CHECK-NEXT
: sqadd z0.h
, z0.h
, #256, lsl #8
53 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
55 sqadd z0.h
, z0.h
, #65536
56 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
57 // CHECK-NEXT
: sqadd z0.h
, z0.h
, #65536
58 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
61 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
62 // CHECK-NEXT
: sqadd z0.s
, z0.s
, #-1
63 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
65 sqadd z0.s
, z0.s
, #256, lsl #8
66 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
67 // CHECK-NEXT
: sqadd z0.s
, z0.s
, #256, lsl #8
68 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
70 sqadd z0.s
, z0.s
, #65536
71 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
72 // CHECK-NEXT
: sqadd z0.s
, z0.s
, #65536
73 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
76 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
77 // CHECK-NEXT
: sqadd z0.d
, z0.d
, #-1
78 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
80 sqadd z0.d
, z0.d
, #256, lsl #8
81 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
82 // CHECK-NEXT
: sqadd z0.d
, z0.d
, #256, lsl #8
83 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
85 sqadd z0.d
, z0.d
, #65536
86 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255] or a multiple of
256 in range
[256, 65280]
87 // CHECK-NEXT
: sqadd z0.d
, z0.d
, #65536
88 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
91 // --------------------------------------------------------------------------//
92 // Negative tests for instructions that are incompatible with movprfx
94 movprfx z31.d
, p0
/z
, z6.d
95 sqadd z31.d
, z31.d
, #65280
96 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a predicated movprfx
, suggest using unpredicated movprfx
97 // CHECK-NEXT
: sqadd z31.d
, z31.d
, #65280
98 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
100 movprfx z0.d
, p0
/z
, z7.d
101 sqadd z0.d
, z0.d
, z0.d
102 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
103 // CHECK-NEXT
: sqadd z0.d
, z0.d
, z0.d
104 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
107 sqadd z0.d
, z0.d
, z0.d
108 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
109 // CHECK-NEXT
: sqadd z0.d
, z0.d
, z0.d
110 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: