[PATCH] D96336: [AMDGPU] Save VGPR of whole wave when spilling

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 08:23:31 PST 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:1433
+    // lanes of the chosen VGPR. Pick v0 because it doesn't make a difference.
+    Register TmpVGPR = AMDGPU::VGPR0;
     RS->setRegUsed(TmpVGPR);
----------------
If the scavenger finds a vgpr that it thinks is dead, would that mean we only have to save the inactive lanes?


================
Comment at: llvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll:49
 ; GFX6: s_add_u32 s32, s32, 0x[[OFFSET:[0-9a-f]+]]
+; GFX6-NEXT: s_waitcnt expcnt(0)
 ; GFX6-NEXT: buffer_load_dword v{{[0-9]+}}, off, s[{{[0-9:]+}}], s32
----------------
What causes this change?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96336/new/

https://reviews.llvm.org/D96336



More information about the llvm-commits mailing list