[llvm] [RISCV] fix SP recovery in a function epilogue (PR #110809)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 10:12:33 PDT 2024
eaeltsin wrote:
I'm not sure about crashing, but looking at disassembler at https://godbolt.org/z/z8Kehr5ob:
The new code for function foo has prologue
```
addi sp, sp, -496
sd ra, 424(sp)
sd s0, 416(sp)
addi s0, sp, 432
```
and epilogue
```
addi sp, s0, -496 <---- should be 432
ld ra, 424(sp)
ld s0, 416(sp)
addi sp, sp, 496
ret
```
https://github.com/llvm/llvm-project/pull/110809
More information about the llvm-commits
mailing list