Commit df672f6
committed
[DAG] scalarizeExtractedVectorLoad - replace getABITypeAlign with allowsMemoryAccess (PR45116)
One of the cases identified in PR45116 - we don't need to limit extracted loads to ABI alignment, we can use allowsMemoryAccess - which tests using getABITypeAlign, but also checks if a target permits (fast) misaligned memory loads by checking allowsMisalignedMemoryAccesses as a fallback.
I've also cleaned up the alignment calculation code - if we have a constant extraction index then the alignment can be based on an offset from the original vector load alignment, but for non-constant indices we should assume the worst (single element alignment only).
Differential Revision: https://reviews.llvm.org/D1104861 parent dff3454 commit df672f6
File tree
3 files changed
+37
-40
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen
- AArch64
- X86
3 files changed
+37
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18662 | 18662 | | |
18663 | 18663 | | |
18664 | 18664 | | |
18665 | | - | |
18666 | | - | |
18667 | | - | |
18668 | | - | |
18669 | | - | |
18670 | | - | |
| 18665 | + | |
| 18666 | + | |
| 18667 | + | |
| 18668 | + | |
18671 | 18669 | | |
18672 | 18670 | | |
18673 | | - | |
18674 | | - | |
18675 | | - | |
18676 | | - | |
18677 | | - | |
18678 | | - | |
18679 | | - | |
| 18671 | + | |
18680 | 18672 | | |
18681 | 18673 | | |
18682 | 18674 | | |
18683 | 18675 | | |
18684 | 18676 | | |
18685 | 18677 | | |
| 18678 | + | |
18686 | 18679 | | |
18687 | 18680 | | |
18688 | 18681 | | |
18689 | 18682 | | |
| 18683 | + | |
18690 | 18684 | | |
| 18685 | + | |
| 18686 | + | |
| 18687 | + | |
| 18688 | + | |
| 18689 | + | |
| 18690 | + | |
| 18691 | + | |
| 18692 | + | |
| 18693 | + | |
18691 | 18694 | | |
18692 | 18695 | | |
18693 | 18696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9143 | 9143 | | |
9144 | 9144 | | |
9145 | 9145 | | |
9146 | | - | |
9147 | | - | |
9148 | | - | |
9149 | | - | |
9150 | 9146 | | |
9151 | | - | |
9152 | | - | |
9153 | | - | |
9154 | | - | |
9155 | | - | |
9156 | | - | |
9157 | | - | |
| 9147 | + | |
| 9148 | + | |
| 9149 | + | |
| 9150 | + | |
| 9151 | + | |
9158 | 9152 | | |
9159 | 9153 | | |
9160 | 9154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
| 335 | + | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | 339 | | |
| 340 | + | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
| 363 | + | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | 367 | | |
| 368 | + | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
449 | | - | |
| 448 | + | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | 452 | | |
| 453 | + | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | | - | |
| 476 | + | |
| 477 | + | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | 480 | | |
| 481 | + | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| |||
0 commit comments