1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s
2
3
4// --------------------------------------------------------------------------//
5// Invalid element width
6
7fcvtnt z0.b, p0/m, z0.b
8// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
9// CHECK-NEXT: fcvtnt z0.b, p0/m, z0.b
10// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
11
12fcvtnt z0.h, p0/m, z0.h
13// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
14// CHECK-NEXT: fcvtnt z0.h, p0/m, z0.h
15// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
16
17fcvtnt z0.s, p0/m, z0.s
18// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
19// CHECK-NEXT: fcvtnt z0.s, p0/m, z0.s
20// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
21
22fcvtnt z0.d, p0/m, z0.d
23// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
24// CHECK-NEXT: fcvtnt z0.d, p0/m, z0.d
25// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
26
27fcvtnt z0.b, p0/m, z0.h
28// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
29// CHECK-NEXT: fcvtnt z0.b, p0/m, z0.h
30// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
31
32fcvtnt z0.d, p0/m, z0.q
33// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
34// CHECK-NEXT: fcvtnt z0.d, p0/m, z0.q
35// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
36
37
38// --------------------------------------------------------------------------//
39// Invalid predicate operation
40
41fcvtnt z0.h, p0/z, z0.s
42// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
43// CHECK-NEXT: fcvtnt z0.h, p0/z, z0.s
44// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
45
46
47// --------------------------------------------------------------------------//
48// Predicate not in restricted predicate range
49
50fcvtnt z0.h, p8/m, z0.s
51// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix)
52// CHECK-NEXT: fcvtnt z0.h, p8/m, z0.s
53// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
54
55
56// --------------------------------------------------------------------------//
57// Negative tests for instructions that are incompatible with movprfx
58
59movprfx z0.s, p0/m, z7.s
60fcvtnt z0.s, p7/m, z1.d
61// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
62// CHECK-NEXT: fcvtnt z0.s, p7/m, z1.d
63// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
64
65movprfx z0, z7
66fcvtnt z0.s, p7/m, z1.d
67// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov
68// CHECK-NEXT: fcvtnt z0.s, p7/m, z1.d
69// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
70