1 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve2
2>&1 < %s| FileCheck
%s
3 sqshrnb z30.
b, z10.h
, #0
4 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 8]
5 // CHECK-NEXT
: sqshrnb z30.
b, z10.h
, #0
6 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
8 sqshrnb z18.
b, z27.h
, #9
9 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 8]
10 // CHECK-NEXT
: sqshrnb z18.
b, z27.h
, #9
11 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
13 sqshrnb z26.h
, z4.s
, #0
14 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 16]
15 // CHECK-NEXT
: sqshrnb z26.h
, z4.s
, #0
16 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
18 sqshrnb z25.h
, z10.s
, #17
19 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 16]
20 // CHECK-NEXT
: sqshrnb z25.h
, z10.s
, #17
21 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
23 sqshrnb z17.s
, z0.d
, #0
24 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 32]
25 // CHECK-NEXT
: sqshrnb z17.s
, z0.d
, #0
26 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
28 sqshrnb z0.s
, z15.d
, #33
29 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: immediate must
be an integer in range
[1, 32]
30 // CHECK-NEXT
: sqshrnb z0.s
, z15.d
, #33
31 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
34 // --------------------------------------------------------------------------//
35 // Invalid element width
37 sqshrnb z0.
b, z0.
b, #1
38 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
39 // CHECK-NEXT
: sqshrnb z0.
b, z0.
b, #1
40 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
42 sqshrnb z0.h
, z0.h
, #1
43 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
44 // CHECK-NEXT
: sqshrnb z0.h
, z0.h
, #1
45 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
47 sqshrnb z0.s
, z0.s
, #1
48 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
49 // CHECK-NEXT
: sqshrnb z0.s
, z0.s
, #1
50 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
52 sqshrnb z0.d
, z0.d
, #1
53 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: invalid element width
54 // CHECK-NEXT
: sqshrnb z0.d
, z0.d
, #1
55 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}:
58 // --------------------------------------------------------------------------//
59 // Negative tests for instructions that are incompatible with movprfx
62 sqshrnb z31.s
, z31.d
, #32
63 // CHECK
: [[@LINE-
1]]:{{[0-9]+}}: error
: instruction is unpredictable when following
a movprfx
, suggest replacing movprfx with mov
64 // CHECK-NEXT
: sqshrnb z31.s
, z31.d
, #32
65 // CHECK-
NOT: [[@LINE-
1]]:{{[0-9]+}}: