[PATCH] D96517: [AMDGPU] Optimize SGPR to scratch spilling
    Matt Arsenault via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Feb 16 15:18:24 PST 2021
    
    
  
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:1186
+      if (!SB.TmpVGPRLive) {
+        // Only spill inactive lanes
+        if (!SB.SavedExecLoOnly || AMDGPU::isGFX10Plus(ST)) {
----------------
I don't think limiting the lanes helps any. Are you 100% sure this is worth the extra complexity? Does it actually reduce bandwidth?
================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:1187
+        // Only spill inactive lanes
+        if (!SB.SavedExecLoOnly || AMDGPU::isGFX10Plus(ST)) {
+          // _saveexec_b32 instructions are only available on gfx10+
----------------
Specific feature checks are better than generation version checks
================
Comment at: llvm/test/CodeGen/AMDGPU/partial-sgpr-to-vgpr-spills.ll:764
 ; GCN-NEXT:    ;;#ASMEND
 ; GCN-NEXT:    ;;#FAKE_DEF v0
 ; GCN-NEXT:    s_not_b64 exec, exec
----------------
I thought you renamed this?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96517/new/
https://reviews.llvm.org/D96517
    
    
More information about the llvm-commits
mailing list