Commit b5cf030
authored
[AArch64][SME] Fix accessing the emergency spill slot with hazard padding (#142190)
This patch fixes an issue where when hazard padding was enabled locals,
including the emergency spill slot, could not be directly addressed.
Generally, this is fine, we can materialize the constant offset in a
scratch register, but if there's no register free we need to spill, and
if we can't even reach the emergency spill slot then we fail to compile.
This patch fixes this by ensuring that if a function has variable-sized
objects and is likely to have hazard padding we enable the base pointer.
Then if we know a function has hazard padding, place the emergency spill
slot next to the BP/SP, to ensure it can be directly accessed without
stepping over any hazard padding.1 parent 3a45d55 commit b5cf030
File tree
3 files changed
+130
-18
lines changed- llvm
- lib/Target/AArch64
- test/CodeGen/AArch64
3 files changed
+130
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
632 | 633 | | |
633 | 634 | | |
634 | 635 | | |
| 636 | + | |
635 | 637 | | |
636 | | - | |
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
642 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
643 | 657 | | |
644 | 658 | | |
645 | 659 | | |
| |||
764 | 778 | | |
765 | 779 | | |
766 | 780 | | |
767 | | - | |
| 781 | + | |
| 782 | + | |
768 | 783 | | |
769 | 784 | | |
770 | 785 | | |
| |||
Lines changed: 99 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2905 | 2905 | | |
2906 | 2906 | | |
2907 | 2907 | | |
| 2908 | + | |
2908 | 2909 | | |
2909 | | - | |
2910 | | - | |
2911 | | - | |
2912 | | - | |
2913 | | - | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
2914 | 2915 | | |
2915 | 2916 | | |
2916 | 2917 | | |
| |||
2919 | 2920 | | |
2920 | 2921 | | |
2921 | 2922 | | |
2922 | | - | |
| 2923 | + | |
2923 | 2924 | | |
2924 | 2925 | | |
2925 | 2926 | | |
| |||
2985 | 2986 | | |
2986 | 2987 | | |
2987 | 2988 | | |
| 2989 | + | |
2988 | 2990 | | |
2989 | | - | |
2990 | | - | |
2991 | | - | |
2992 | | - | |
2993 | | - | |
2994 | | - | |
2995 | | - | |
2996 | | - | |
2997 | | - | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
2998 | 2996 | | |
2999 | 2997 | | |
3000 | 2998 | | |
| |||
3003 | 3001 | | |
3004 | 3002 | | |
3005 | 3003 | | |
3006 | | - | |
| 3004 | + | |
3007 | 3005 | | |
3008 | 3006 | | |
3009 | 3007 | | |
| |||
0 commit comments