Commit 37fd5fa
committed
[AArch64] Fix LDR/STR folding causing memtag failures
When generating code with sanitize_memtag, we make use of the fact that
the sp+imm forms of many load and store instructions are not
tag-checked, so we can use SP directly instead of needing a register
holding the tagged pointer. However, this isn't true for the writeback
versions of the instructions, so we can't fold ADDs and SUBs into them
in AArch64LoadStoreOptimizer. This would be possible in cases where the
loads/stores only access untagged stack slots, but that information
isn't easily available after frame index elimination.1 parent 7a9d84e commit 37fd5fa
File tree
2 files changed
+16
-4
lines changed- llvm
- lib/Target/AArch64
- test/CodeGen/AArch64
2 files changed
+16
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
| 736 | + | |
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
788 | 797 | | |
789 | 798 | | |
790 | 799 | | |
| |||
2772 | 2781 | | |
2773 | 2782 | | |
2774 | 2783 | | |
| 2784 | + | |
2775 | 2785 | | |
2776 | 2786 | | |
2777 | 2787 | | |
| |||
2842 | 2852 | | |
2843 | 2853 | | |
2844 | 2854 | | |
2845 | | - | |
| 2855 | + | |
2846 | 2856 | | |
2847 | 2857 | | |
2848 | 2858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | | - | |
| 118 | + | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
0 commit comments