1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
2>&1 < %s| FileCheck
%s
4 // ------------------------------------------------------------------------- //
8 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
9 // CHECK-NEXT
: lastb w0
, p8
, z31.
b
10 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
12 lastb 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
: lastb w0
, p7.
b, w0
, z31.
b
15 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
17 lastb 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
: lastb w0
, p7.q
, w0
, z31.
b
20 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
23 // ------------------------------------------------------------------------- //
24 // Invalid element width
27 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
28 // CHECK-NEXT
: lastb x0
, p7
, z31.
b
29 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
32 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
33 // CHECK-NEXT
: lastb x0
, p7
, z31.h
34 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
37 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
38 // CHECK-NEXT
: lastb x0
, p7
, z31.s
39 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
42 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
43 // CHECK-NEXT
: lastb w0
, p7
, z31.d
44 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
47 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
48 // CHECK-NEXT
: lastb b0
, p7
, z31.h
49 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
52 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
53 // CHECK-NEXT
: lastb h0
, p7
, z31.s
54 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
57 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
58 // CHECK-NEXT
: lastb s0
, p7
, z31.d
59 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
62 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
63 // CHECK-NEXT
: lastb d0
, p7
, z31.
b
64 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
67 // --------------------------------------------------------------------------//
68 // Negative tests for instructions that are incompatible with movprfx
70 movprfx z31.d
, p7
/z
, z6.d
72 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
73 // CHECK-NEXT
: lastb x0
, p7
, z31.d
74 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
78 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
79 // CHECK-NEXT
: lastb x0
, p7
, z31.d
80 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
82 movprfx z31.d
, p7
/z
, z6.d
84 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
85 // CHECK-NEXT
: lastb d0
, p7
, z31.d
86 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
90 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
91 // CHECK-NEXT
: lastb d0
, p7
, z31.d
92 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: