Commit 1a34bf6
committed
[AArch64][GlobalISel] Widen more small vectors.
When dealing with smaller-than-legal vectors (like v3i8) there are two ways to
legalizer the type to a larger vector. Non-power-2 vector types are always
widened to a power-2 vector size (adding more elements to the end, so to v4i8).
From there we have the option to promote to v4i16 or widen to v8i8. In SDAG we
would promote integer types and widen fp vectors, which dictates how the
argument types are legalized.
In GISel we have the option to pick, but vector operations like shuffle and
extract/insert need to opt for one (they can't pick differently at the moment
between int and fp). Promote can mean more extends and truncates, although both
have advantages and disadvantages.
This patch switches some of the basic integer vector operations (add, sub, mul,
and, or, xor) to widen as opposed to promote, which is hopefully a better
method going forward and matches more other operations. Some of the
legalization still isn't the best, especially where the result is forced to an
argument or return type (which comes up more in tests than in real-life), and
some will need extra post-legalization combines to improve.1 parent 7efc861 commit 1a34bf6
File tree
21 files changed
+850
-632
lines changed- llvm
- lib/Target/AArch64/GISel
- test/CodeGen/AArch64
- GlobalISel
21 files changed
+850
-632
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 153 | + | |
168 | 154 | | |
169 | 155 | | |
170 | 156 | | |
171 | 157 | | |
172 | 158 | | |
173 | 159 | | |
174 | 160 | | |
175 | | - | |
176 | | - | |
| 161 | + | |
| 162 | + | |
177 | 163 | | |
178 | 164 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 165 | + | |
194 | 166 | | |
195 | 167 | | |
196 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
336 | 349 | | |
337 | 350 | | |
338 | 351 | | |
| |||
358 | 371 | | |
359 | 372 | | |
360 | 373 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
370 | 379 | | |
371 | 380 | | |
372 | 381 | | |
| |||
395 | 404 | | |
396 | 405 | | |
397 | 406 | | |
398 | | - | |
399 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
400 | 424 | | |
401 | 425 | | |
402 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
221 | 234 | | |
222 | 235 | | |
223 | 236 | | |
| |||
243 | 256 | | |
244 | 257 | | |
245 | 258 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
255 | 264 | | |
256 | 265 | | |
257 | 266 | | |
| |||
280 | 289 | | |
281 | 290 | | |
282 | 291 | | |
283 | | - | |
284 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
285 | 309 | | |
286 | 310 | | |
287 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
198 | 222 | | |
199 | | - | |
200 | | - | |
| 223 | + | |
| 224 | + | |
201 | 225 | | |
202 | 226 | | |
203 | 227 | | |
| |||
0 commit comments