================ @@ -511,6 +511,14 @@ SIRegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC, Register SIRegisterInfo::getFrameRegister(const MachineFunction &MF) const { const SIFrameLowering *TFI = ST.getFrameLowering(); const SIMachineFunctionInfo *FuncInfo = MF.getInfo<SIMachineFunctionInfo>(); + + // If we need to reserve scratch space for saving the VGPRs, then we should + // use the frame register for accessing our own frame (which may start at a + // non-zero offset). + if (TFI->mayReserveScratchForCWSR(MF)) + return TFI->hasFP(MF) ? FuncInfo->getFrameOffsetReg() ---------------- rovka wrote:
I was actually already doing that :D I cleaned this up now. https://github.com/llvm/llvm-project/pull/130055 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits