[llvm] [RISCV] Align stack size down to a multiple of 16 before using cm.push/pop. (PR #86073)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 20:22:58 PDT 2024
================
@@ -554,8 +554,10 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF,
if (RVFI->isPushable(MF) && FirstFrameSetup != MBB.end() &&
FirstFrameSetup->getOpcode() == RISCV::CM_PUSH) {
// Use available stack adjustment in push instruction to allocate additional
- // stack space.
- uint64_t Spimm = std::min(StackSize, (uint64_t)48);
+ // stack space. Align the stack size down to a multiple of 16. This is
+ // needed for RVE.
+ // FIXME: Can we increase the stack size to a multiple of 16 insead?
----------------
wangpc-pp wrote:
`insead`->`instead`
https://github.com/llvm/llvm-project/pull/86073
More information about the llvm-commits
mailing list