Commit 0e16af8
[ARM] Update IsRestored for LR based on all returns (llvm#82745)
PR llvm#75527 fixed ARMFrameLowering to set the IsRestored flag for LR based
on all of the return instructions in the function, not just one.
However, there is also code in ARMLoadStoreOptimizer which changes
return instructions, but it set IsRestored based on the one instruction
it changed, not the whole function.
The fix is to factor out the code added in llvm#75527, and also call it from
ARMLoadStoreOptimizer if it made a change to return instructions.
Fixes llvm#80287.
(cherry picked from commit 749384c)1 parent 6f8016f commit 0e16af8
File tree
4 files changed
+27
-22
lines changed- llvm
- lib/Target/ARM
- test/CodeGen/ARM
4 files changed
+27
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2781 | 2781 | | |
2782 | 2782 | | |
2783 | 2783 | | |
2784 | | - | |
2785 | | - | |
2786 | | - | |
2787 | | - | |
| 2784 | + | |
2788 | 2785 | | |
2789 | 2786 | | |
2790 | 2787 | | |
| |||
2808 | 2805 | | |
2809 | 2806 | | |
2810 | 2807 | | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
2811 | 2814 | | |
2812 | 2815 | | |
2813 | 2816 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2062 | 2062 | | |
2063 | 2063 | | |
2064 | 2064 | | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
2075 | | - | |
2076 | 2065 | | |
2077 | 2066 | | |
2078 | 2067 | | |
| |||
2120 | 2109 | | |
2121 | 2110 | | |
2122 | 2111 | | |
2123 | | - | |
| 2112 | + | |
2124 | 2113 | | |
2125 | 2114 | | |
2126 | 2115 | | |
2127 | | - | |
| 2116 | + | |
2128 | 2117 | | |
2129 | 2118 | | |
2130 | 2119 | | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
2131 | 2128 | | |
2132 | 2129 | | |
2133 | 2130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments