• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve  2>&1 < %s| FileCheck %s
2
3// ------------------------------------------------------------------------- //
4// Invalid result register
5
6uqincd wsp
7// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
8// CHECK-NEXT: uqincd wsp
9// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
10
11uqincd sp
12// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
13// CHECK-NEXT: uqincd sp
14// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
15
16uqincd z0.s
17// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
18// CHECK-NEXT: uqincd z0.s
19// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
20
21
22// ------------------------------------------------------------------------- //
23// Operands not matching up (unsigned inc only has one register operand)
24
25uqincd x0, w0
26// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
27// CHECK-NEXT: uqincd x0, w0
28// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
29
30uqincd w0, w0
31// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
32// CHECK-NEXT: uqincd w0, w0
33// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
34
35uqincd x0, x0
36// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
37// CHECK-NEXT: uqincd x0, x0
38// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
39
40
41// ------------------------------------------------------------------------- //
42// Immediate not compatible with encode/decode function.
43
44uqincd x0, all, mul #-1
45// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
46// CHECK-NEXT: uqincd x0, all, mul #-1
47// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
48
49uqincd x0, all, mul #0
50// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
51// CHECK-NEXT: uqincd x0, all, mul #0
52// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
53
54uqincd x0, all, mul #17
55// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16]
56// CHECK-NEXT: uqincd x0, all, mul #17
57// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
58
59
60// ------------------------------------------------------------------------- //
61// Invalid predicate patterns
62
63uqincd x0, vl512
64// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
65// CHECK-NEXT: uqincd x0, vl512
66// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
67
68uqincd x0, vl9
69// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
70// CHECK-NEXT: uqincd x0, vl9
71// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
72
73uqincd x0, #-1
74// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate pattern
75// CHECK-NEXT: uqincd x0, #-1
76// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
77
78uqincd x0, #32
79// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate pattern
80// CHECK-NEXT: uqincd x0, #32
81// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
82
83
84// --------------------------------------------------------------------------//
85// Negative tests for instructions that are incompatible with movprfx
86
87movprfx z0.d, p0/z, z7.d
88uqincd  z0.d
89// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
90// CHECK-NEXT: uqincd  z0.d
91// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
92
93movprfx z0.d, p0/z, z7.d
94uqincd  z0.d, pow2, mul #16
95// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
96// CHECK-NEXT: uqincd  z0.d, pow2, mul #16
97// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
98
99movprfx z0.d, p0/z, z7.d
100uqincd  z0.d, pow2
101// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx
102// CHECK-NEXT: uqincd  z0.d, pow2
103// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
104