[llvm] [PPC][AIX] Save/restore r31 when using base pointer (PR #100182)
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 18:13:37 PDT 2024
================
@@ -2025,8 +2025,18 @@ void PPCFrameLowering::determineCalleeSaves(MachineFunction &MF,
// code. Same goes for the base pointer and the PIC base register.
if (needsFP(MF))
SavedRegs.reset(isPPC64 ? PPC::X31 : PPC::R31);
- if (RegInfo->hasBasePointer(MF))
+ if (RegInfo->hasBasePointer(MF)) {
SavedRegs.reset(RegInfo->getBaseRegister(MF));
+ // On AIX, when BaseRegister(R30) is used, need to spill r31 too to match
----------------
chenzheng1030 wrote:
nit: maybe it's good to make R30 and r31 be consistent, my bad : )
https://github.com/llvm/llvm-project/pull/100182
More information about the llvm-commits
mailing list