[llvm] [AMDGPU] Convert SVS form scratch frame index fallback into SV form (PR #219239)
Lukas Sommer via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 05:45:19 PDT 2026
================
@@ -3265,15 +3265,17 @@ bool SIRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
// after). Only bail out when there is no frame register, or a VGPR
// operand is needed but none could be scavenged.
if ((!TmpSReg && !FrameReg) || (!TmpReg && !UseSGPR)) {
- int SVOpcode = AMDGPU::getFlatScratchInstSVfromSS(MI->getOpcode());
+ int SVfromSSOpcode =
+ AMDGPU::getFlatScratchInstSVfromSS(MI->getOpcode());
+ int SVfromSVSOpcode =
+ AMDGPU::getFlatScratchInstSVfromSVS(MI->getOpcode());
+ int SVOpcode = SVfromSSOpcode != -1 ? SVfromSSOpcode : SVfromSVSOpcode;
if (ST.hasFlatScratchSVSMode() && SVOpcode != -1) {
// SV form encodes only the offset in vaddr; an SS-form scratch op
// keeps its FI in the SGPR saddr, so this is only reached with no
// frame register.
----------------
sommerlukas wrote:
Should this comment be updated to mention SVS as well?
https://github.com/llvm/llvm-project/pull/219239
More information about the llvm-commits
mailing list