[llvm-branch-commits] [llvm-branch] r271766 - Merging r266824:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jun 3 20:43:01 PDT 2016


Author: tstellar
Date: Fri Jun  3 22:43:01 2016
New Revision: 271766

URL: http://llvm.org/viewvc/llvm-project?rev=271766&view=rev
Log:
Merging r266824:

------------------------------------------------------------------------
r266824 | nhaehnle | 2016-04-19 14:58:17 -0700 (Tue, 19 Apr 2016) | 21 lines

AMDGPU/SI: SGPR accounting in getSIProgramInfo must ignore exec_lo/hi

Summary:
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.

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D19199

------------------------------------------------------------------------

Modified:
    llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp

Modified: llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=271766&r1=271765&r2=271766&view=diff
==============================================================================
--- llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)
+++ llvm/branches/release_38/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Fri Jun  3 22:43:01 2016
@@ -366,6 +366,8 @@ void AMDGPUAsmPrinter::getSIProgramInfo(
         unsigned reg = MO.getReg();
         switch (reg) {
         case AMDGPU::EXEC:
+        case AMDGPU::EXEC_LO:
+        case AMDGPU::EXEC_HI:
         case AMDGPU::SCC:
         case AMDGPU::M0:
           continue;




More information about the llvm-branch-commits mailing list