Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / SVE / incw.s
blob46c72cc3f16fbbb1f7b0cde50e3458a2cebe7810
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
4 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
9 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
10 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN
12 // ---------------------------------------------------------------------------//
13 // Test vector form and aliases.
14 // ---------------------------------------------------------------------------//
16 incw z0.s
17 // CHECK-INST: incw z0.s
18 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
19 // CHECK-ERROR: instruction requires: sve or sme
20 // CHECK-UNKNOWN: 04b0c3e0 <unknown>
22 incw z0.s, all
23 // CHECK-INST: incw z0.s
24 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
25 // CHECK-ERROR: instruction requires: sve or sme
26 // CHECK-UNKNOWN: 04b0c3e0 <unknown>
28 incw z0.s, all, mul #1
29 // CHECK-INST: incw z0.s
30 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
31 // CHECK-ERROR: instruction requires: sve or sme
32 // CHECK-UNKNOWN: 04b0c3e0 <unknown>
34 incw z0.s, all, mul #16
35 // CHECK-INST: incw z0.s, all, mul #16
36 // CHECK-ENCODING: [0xe0,0xc3,0xbf,0x04]
37 // CHECK-ERROR: instruction requires: sve or sme
38 // CHECK-UNKNOWN: 04bfc3e0 <unknown>
41 // ---------------------------------------------------------------------------//
42 // Test scalar form and aliases.
43 // ---------------------------------------------------------------------------//
45 incw x0
46 // CHECK-INST: incw x0
47 // CHECK-ENCODING: [0xe0,0xe3,0xb0,0x04]
48 // CHECK-ERROR: instruction requires: sve or sme
49 // CHECK-UNKNOWN: 04b0e3e0 <unknown>
51 incw x0, all
52 // CHECK-INST: incw x0
53 // CHECK-ENCODING: [0xe0,0xe3,0xb0,0x04]
54 // CHECK-ERROR: instruction requires: sve or sme
55 // CHECK-UNKNOWN: 04b0e3e0 <unknown>
57 incw x0, all, mul #1
58 // CHECK-INST: incw x0
59 // CHECK-ENCODING: [0xe0,0xe3,0xb0,0x04]
60 // CHECK-ERROR: instruction requires: sve or sme
61 // CHECK-UNKNOWN: 04b0e3e0 <unknown>
63 incw x0, all, mul #16
64 // CHECK-INST: incw x0, all, mul #16
65 // CHECK-ENCODING: [0xe0,0xe3,0xbf,0x04]
66 // CHECK-ERROR: instruction requires: sve or sme
67 // CHECK-UNKNOWN: 04bfe3e0 <unknown>
70 // ---------------------------------------------------------------------------//
71 // Test predicate patterns
72 // ---------------------------------------------------------------------------//
75 incw x0, pow2
76 // CHECK-INST: incw x0, pow2
77 // CHECK-ENCODING: [0x00,0xe0,0xb0,0x04]
78 // CHECK-ERROR: instruction requires: sve or sme
79 // CHECK-UNKNOWN: 04b0e000 <unknown>
81 incw x0, vl1
82 // CHECK-INST: incw x0, vl1
83 // CHECK-ENCODING: [0x20,0xe0,0xb0,0x04]
84 // CHECK-ERROR: instruction requires: sve or sme
85 // CHECK-UNKNOWN: 04b0e020 <unknown>
87 incw x0, vl2
88 // CHECK-INST: incw x0, vl2
89 // CHECK-ENCODING: [0x40,0xe0,0xb0,0x04]
90 // CHECK-ERROR: instruction requires: sve or sme
91 // CHECK-UNKNOWN: 04b0e040 <unknown>
93 incw x0, vl3
94 // CHECK-INST: incw x0, vl3
95 // CHECK-ENCODING: [0x60,0xe0,0xb0,0x04]
96 // CHECK-ERROR: instruction requires: sve or sme
97 // CHECK-UNKNOWN: 04b0e060 <unknown>
99 incw x0, vl4
100 // CHECK-INST: incw x0, vl4
101 // CHECK-ENCODING: [0x80,0xe0,0xb0,0x04]
102 // CHECK-ERROR: instruction requires: sve or sme
103 // CHECK-UNKNOWN: 04b0e080 <unknown>
105 incw x0, vl5
106 // CHECK-INST: incw x0, vl5
107 // CHECK-ENCODING: [0xa0,0xe0,0xb0,0x04]
108 // CHECK-ERROR: instruction requires: sve or sme
109 // CHECK-UNKNOWN: 04b0e0a0 <unknown>
111 incw x0, vl6
112 // CHECK-INST: incw x0, vl6
113 // CHECK-ENCODING: [0xc0,0xe0,0xb0,0x04]
114 // CHECK-ERROR: instruction requires: sve or sme
115 // CHECK-UNKNOWN: 04b0e0c0 <unknown>
117 incw x0, vl7
118 // CHECK-INST: incw x0, vl7
119 // CHECK-ENCODING: [0xe0,0xe0,0xb0,0x04]
120 // CHECK-ERROR: instruction requires: sve or sme
121 // CHECK-UNKNOWN: 04b0e0e0 <unknown>
123 incw x0, vl8
124 // CHECK-INST: incw x0, vl8
125 // CHECK-ENCODING: [0x00,0xe1,0xb0,0x04]
126 // CHECK-ERROR: instruction requires: sve or sme
127 // CHECK-UNKNOWN: 04b0e100 <unknown>
129 incw x0, vl16
130 // CHECK-INST: incw x0, vl16
131 // CHECK-ENCODING: [0x20,0xe1,0xb0,0x04]
132 // CHECK-ERROR: instruction requires: sve or sme
133 // CHECK-UNKNOWN: 04b0e120 <unknown>
135 incw x0, vl32
136 // CHECK-INST: incw x0, vl32
137 // CHECK-ENCODING: [0x40,0xe1,0xb0,0x04]
138 // CHECK-ERROR: instruction requires: sve or sme
139 // CHECK-UNKNOWN: 04b0e140 <unknown>
141 incw x0, vl64
142 // CHECK-INST: incw x0, vl64
143 // CHECK-ENCODING: [0x60,0xe1,0xb0,0x04]
144 // CHECK-ERROR: instruction requires: sve or sme
145 // CHECK-UNKNOWN: 04b0e160 <unknown>
147 incw x0, vl128
148 // CHECK-INST: incw x0, vl128
149 // CHECK-ENCODING: [0x80,0xe1,0xb0,0x04]
150 // CHECK-ERROR: instruction requires: sve or sme
151 // CHECK-UNKNOWN: 04b0e180 <unknown>
153 incw x0, vl256
154 // CHECK-INST: incw x0, vl256
155 // CHECK-ENCODING: [0xa0,0xe1,0xb0,0x04]
156 // CHECK-ERROR: instruction requires: sve or sme
157 // CHECK-UNKNOWN: 04b0e1a0 <unknown>
159 incw x0, #14
160 // CHECK-INST: incw x0, #14
161 // CHECK-ENCODING: [0xc0,0xe1,0xb0,0x04]
162 // CHECK-ERROR: instruction requires: sve or sme
163 // CHECK-UNKNOWN: 04b0e1c0 <unknown>
165 incw x0, #28
166 // CHECK-INST: incw x0, #28
167 // CHECK-ENCODING: [0x80,0xe3,0xb0,0x04]
168 // CHECK-ERROR: instruction requires: sve or sme
169 // CHECK-UNKNOWN: 04b0e380 <unknown>
172 // --------------------------------------------------------------------------//
173 // Test compatibility with MOVPRFX instruction.
175 movprfx z0, z7
176 // CHECK-INST: movprfx z0, z7
177 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
178 // CHECK-ERROR: instruction requires: sve or sme
179 // CHECK-UNKNOWN: 0420bce0 <unknown>
181 incw z0.s
182 // CHECK-INST: incw z0.s
183 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
184 // CHECK-ERROR: instruction requires: sve or sme
185 // CHECK-UNKNOWN: 04b0c3e0 <unknown>
187 movprfx z0, z7
188 // CHECK-INST: movprfx z0, z7
189 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
190 // CHECK-ERROR: instruction requires: sve or sme
191 // CHECK-UNKNOWN: 0420bce0 <unknown>
193 incw z0.s, all, mul #16
194 // CHECK-INST: incw z0.s, all, mul #16
195 // CHECK-ENCODING: [0xe0,0xc3,0xbf,0x04]
196 // CHECK-ERROR: instruction requires: sve or sme
197 // CHECK-UNKNOWN: 04bfc3e0 <unknown>
199 movprfx z0, z7
200 // CHECK-INST: movprfx z0, z7
201 // CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
202 // CHECK-ERROR: instruction requires: sve or sme
203 // CHECK-UNKNOWN: 0420bce0 <unknown>
205 incw z0.s, all
206 // CHECK-INST: incw z0.s
207 // CHECK-ENCODING: [0xe0,0xc3,0xb0,0x04]
208 // CHECK-ERROR: instruction requires: sve or sme
209 // CHECK-UNKNOWN: 04b0c3e0 <unknown>