[LoongArch] Split SP adjustment
authorwanglei <wanglei@loongson.cn>
Fri, 28 Oct 2022 08:18:40 +0000 (16:18 +0800)
committerWeining Lu <luweining@loongson.cn>
Fri, 28 Oct 2022 08:39:00 +0000 (16:39 +0800)
commitf589e5067fc8c15d8fc228169055c63ff29b2c14
treed7982d2a1796a3e750fcbd446498e0039b084ea6
parentb251b608b5fc7c859bc73f0cb1b8cc16a626fecc
[LoongArch] Split SP adjustment

This patch split the SP adjustment to reduce the instructions in
prologue and epilogue. In this way, the offset of the callee saved
register could fit in a single store.

Similar to D68011(RISCV).

Differential Revision: https://reviews.llvm.org/D136222
llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
llvm/lib/Target/LoongArch/LoongArchFrameLowering.h
llvm/test/CodeGen/LoongArch/split-sp-adjust.ll [new file with mode: 0644]
llvm/test/CodeGen/LoongArch/stack-realignment.ll