1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve  2>&1 < %s| FileCheck %s
2
3// --------------------------------------------------------------------------//
4// Invalid predicate
5
6compact z23.d, p8, z13.d
7// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7].
8// CHECK-NEXT: compact z23.d, p8, z13.d
9// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11
12// --------------------------------------------------------------------------//
13// Invalid element widths
14
15compact z31.s, p7, z31.d
16// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
17// CHECK-NEXT: compact z31.s, p7, z31.d
18// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
19
20compact z31.b, p7, z31.b
21// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
22// CHECK-NEXT: compact z31.b, p7, z31.b
23// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
24
25compact z31.h, p7, z31.h
26// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
27// CHECK-NEXT: compact z31.h, p7, z31.h
28// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29
30
31// --------------------------------------------------------------------------//
32// Negative tests for instructions that are incompatible with movprfx
33
34movprfx z31.d, p7/z, z6.d
35compact z31.d, p7, z31.d
36// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
37// CHECK-NEXT: compact z31.d, p7, z31.d
38// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
39
40movprfx z31, z6
41compact z31.d, p7, z31.d
42// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
43// CHECK-NEXT: compact z31.d, p7, z31.d
44// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45