[llvm] [AMDGPU] Restore SP correctly in functions with dynamic allocas (PR #122743)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 10:10:41 PST 2025
s-barannikov wrote:
> Prolog:
`tmp = sp + (alignment - 1)`
`fp &= -alignment`
`bp = sp`
`sp += frameSize + alignment`
Epilog:
`sp += bp + frameSize + alignment`
`sp -= (frameSize + alignment)`
The epilogue sequence is effectively `sp += bp`, is this correct?
The prologue sequence is also confusing. Usually, `fp` and `bp` have swapped meaning.
https://github.com/llvm/llvm-project/pull/122743
More information about the llvm-commits
mailing list