1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
2>&1 < %s| FileCheck
%s
4 // ------------------------------------------------------------------------- //
7 clastb w0
, p8
, w0
, z31.
b
8 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
9 // CHECK-NEXT
: clastb w0
, p8
, w0
, z31.
b
10 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
12 clastb w0
, p7.
b, w0
, z31.
b
13 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
14 // CHECK-NEXT
: clastb w0
, p7.
b, w0
, z31.
b
15 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
17 clastb w0
, p7.q
, w0
, z31.
b
18 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
19 // CHECK-NEXT
: clastb w0
, p7.q
, w0
, z31.
b
20 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
23 // ------------------------------------------------------------------------- //
24 // Invalid element width
26 clastb w0
, p7
, x0
, z31.
b
27 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand
28 // CHECK-NEXT
: clastb w0
, p7
, x0
, z31.
b
29 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
31 clastb x0
, p7
, x0
, z31.
b
32 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
33 // CHECK-NEXT
: clastb x0
, p7
, x0
, z31.
b
34 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
36 clastb x0
, p7
, x0
, z31.h
37 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
38 // CHECK-NEXT
: clastb x0
, p7
, x0
, z31.h
39 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
41 clastb x0
, p7
, x0
, z31.s
42 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
43 // CHECK-NEXT
: clastb x0
, p7
, x0
, z31.s
44 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
46 clastb w0
, p7
, w0
, z31.d
47 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
48 // CHECK-NEXT
: clastb w0
, p7
, w0
, z31.d
49 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
51 clastb b0
, p7
, b0
, z31.h
52 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
53 // CHECK-NEXT
: clastb b0
, p7
, b0
, z31.h
54 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
56 clastb h0
, p7
, h0
, z31.s
57 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
58 // CHECK-NEXT
: clastb h0
, p7
, h0
, z31.s
59 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
61 clastb s0
, p7
, s0
, z31.d
62 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
63 // CHECK-NEXT
: clastb s0
, p7
, s0
, z31.d
64 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
66 clastb d0
, p7
, d0
, z31.
b
67 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
68 // CHECK-NEXT
: clastb d0
, p7
, d0
, z31.
b
69 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
71 clastb z0.
b, p7
, z0.
b, z31.h
72 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
73 // CHECK-NEXT
: clastb z0.
b, p7
, z0.
b, z31.h
74 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
76 clastb z0.h
, p7
, z0.h
, z31.s
77 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
78 // CHECK-NEXT
: clastb z0.h
, p7
, z0.h
, z31.s
79 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
81 clastb z0.s
, p7
, z0.s
, z31.d
82 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
83 // CHECK-NEXT
: clastb z0.s
, p7
, z0.s
, z31.d
84 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
86 clastb z0.d
, p7
, z0.d
, z31.
b
87 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
88 // CHECK-NEXT
: clastb z0.d
, p7
, z0.d
, z31.
b
89 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
92 // --------------------------------------------------------------------------//
93 // Negative tests for instructions that are incompatible with movprfx
95 movprfx z31.d
, p7
/z
, z6.d
96 clastb x0
, p7
, x0
, z31.d
97 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
98 // CHECK-NEXT
: clastb x0
, p7
, x0
, z31.d
99 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
102 clastb x0
, p7
, x0
, z31.d
103 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
104 // CHECK-NEXT
: clastb x0
, p7
, x0
, z31.d
105 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
107 movprfx z31.d
, p7
/z
, z6.d
108 clastb d0
, p7
, d0
, z31.d
109 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
110 // CHECK-NEXT
: clastb d0
, p7
, d0
, z31.d
111 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
114 clastb d0
, p7
, d0
, z31.d
115 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
116 // CHECK-NEXT
: clastb d0
, p7
, d0
, z31.d
117 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
119 movprfx z0.d
, p7
/z
, z7.d
120 clastb z0.d
, p7
, z0.d
, z31.d
121 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a predicated movprfx
, suggest using unpredicated movprfx
122 // CHECK-NEXT
: clastb z0.d
, p7
, z0.d
, z31.d
123 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: