1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
2>&1 < %s| FileCheck
%s
4 // ------------------------------------------------------------------------- //
5 // Tied operands must match
7 ext z0.
b, z1.
b, z2.
b, #0
8 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: operand must match destination register
9 // CHECK-NEXT
: ext z0.
b, z1.
b, z2.
b, #0
10 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
13 // ------------------------------------------------------------------------- //
14 // Invalid element widths.
16 ext z0.h
, z0.h
, z1.h
, #0
17 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
18 // CHECK-NEXT
: ext z0.h
, z0.h
, z1.h
, #0
19 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
22 // ------------------------------------------------------------------------- //
23 // Invalid immediate range.
25 ext z0.
b, z0.
b, z1.
b, #-1
26 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255].
27 // CHECK-NEXT
: ext z0.
b, z0.
b, z1.
b, #-1
28 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
30 ext z0.
b, z0.
b, z1.
b, #256
31 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[0, 255].
32 // CHECK-NEXT
: ext z0.
b, z0.
b, z1.
b, #256
33 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
36 // --------------------------------------------------------------------------//
37 // Negative tests for instructions that are incompatible with movprfx
39 movprfx z31.
b, p0
/z
, z6.
b
40 ext z31.
b, z31.
b, z0.
b, #255
41 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a predicated movprfx
, suggest using unpredicated movprfx
42 // CHECK-NEXT
: ext z31.
b, z31.
b, z0.
b, #255
43 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: