[PATCH] D19199: AMDGPU/SI: SGPR accounting in getSIProgramInfo must ignore exec_lo/hi
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 17 11:55:51 PDT 2016
nhaehnle created this revision.
nhaehnle added reviewers: arsenm, tstellarAMD.
nhaehnle added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.
A shader stored the live mask (initial exec mask) in an SGPR which was then
spilled during register allocation. The allocator quite reasonably
optimized turned the spill into
v_writelane_b32 %vgpr, exec_lo, N
v_writelane_b32 %vgpr, exec_hi, N+1
at the beginning of the shader, confusing the SGPR accounting.
No test case, because si-sgpr-spill.ll together with an upcoming patch for
WQM handling exhibits the problem.
http://reviews.llvm.org/D19199
Files:
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
Index: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -370,6 +370,8 @@
unsigned reg = MO.getReg();
switch (reg) {
case AMDGPU::EXEC:
+ case AMDGPU::EXEC_LO:
+ case AMDGPU::EXEC_HI:
case AMDGPU::SCC:
case AMDGPU::M0:
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19199.54008.patch
Type: text/x-patch
Size: 445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160417/fb31badd/attachment.bin>
More information about the llvm-commits
mailing list