llvm-project
8e65b726 - [RISCV] Fix double counting CSRs with Zcmp in RISCVFrameLowering::getFrameIndexReference. (#117207)

Commit
1 year ago
[RISCV] Fix double counting CSRs with Zcmp in RISCVFrameLowering::getFrameIndexReference. (#117207) The Zcmp callee saved registers are already accounted for in getCalleeSavedStackSize(). Subtracting RVPushStackSize subtracts them a second time leading to incorrect stack offsets during frame index elimination. This should have been removed in 0de2b26942f890a6ec84cd75ac7abe3f6f2b2e37 when Zcmp handling was changed. Prior to that, RVPushStackSize was not included in getCalleeSavedStackSize(). The commit message at the time noted that Zcmp+RVV was likely broken.
Author
Parents
Loading