1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve2
2>&1 < %s| FileCheck
%s
3 // --------------------------------------------------------------------------//
4 // Restricted predicate out of range.
6 nmatch p0.
b, p8
/z
, z0.
b, z0.
b
7 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid restricted predicate register
, expected p0.
.p7 (without element suffix)
8 // CHECK-NEXT
: nmatch p0.
b, p8
/z
, z0.
b, z0.
b
9 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
12 // --------------------------------------------------------------------------//
13 // Invalid predicate operation
15 nmatch p0.
b, p0
/m
, z0.
b, z0.
b
16 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid operand for instruction
17 // CHECK-NEXT
: nmatch p0.
b, p0
/m
, z0.
b, z0.
b
18 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
21 // --------------------------------------------------------------------------//
22 // Invalid destination predicate register
24 nmatch p0.s
, p0
/z
, z0.
b, z0.
b
25 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid predicate register.
26 // CHECK-NEXT
: nmatch p0.s
, p0
/z
, z0.
b, z0.
b
27 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
29 nmatch p0.d
, p0
/z
, z0.
b, z0.
b
30 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid predicate register.
31 // CHECK-NEXT
: nmatch p0.d
, p0
/z
, z0.
b, z0.
b
32 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
34 // --------------------------------------------------------------------------//
35 // Invalid element width
37 nmatch p0.
b, p0
/z
, z0.s
, z0.s
38 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
39 // CHECK-NEXT
: nmatch p0.
b, p0
/z
, z0.s
, z0.s
40 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
42 nmatch p0.
b, p0
/z
, z0.d
, z0.d
43 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
44 // CHECK-NEXT
: nmatch p0.
b, p0
/z
, z0.d
, z0.d
45 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
48 // --------------------------------------------------------------------------//
49 // Negative tests for instructions that are incompatible with movprfx
51 movprfx z0.
b, p0
/z
, z7.
b
52 nmatch p0.
b, p0
/z
, z0.
b, z0.
b
53 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
54 // CHECK-NEXT
: nmatch p0.
b, p0
/z
, z0.
b, z0.
b
55 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
58 nmatch p0.
b, p0
/z
, z0.
b, z0.
b
59 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
60 // CHECK-NEXT
: nmatch p0.
b, p0
/z
, z0.
b, z0.
b
61 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: