summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2016-04-19 21:58:17 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2016-04-19 21:58:17 +0000
commit7483937bf0e36ef0afd34a3471e76901e0e49796 (patch)
treeabfa2c301013e89476d9bfde1a60e14e1da815f1
parent152c18e9ac32a7e82d36dcc8c42cffc5487554b7 (diff)
downloadbcm5719-llvm-7483937bf0e36ef0afd34a3471e76901e0e49796.tar.gz
bcm5719-llvm-7483937bf0e36ef0afd34a3471e76901e0e49796.zip
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 llvm-svn: 266824
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
index 299872d3dee..843513d23ca 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -370,6 +370,8 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
unsigned reg = MO.getReg();
switch (reg) {
case AMDGPU::EXEC:
+ case AMDGPU::EXEC_LO:
+ case AMDGPU::EXEC_HI:
case AMDGPU::SCC:
case AMDGPU::M0:
continue;
OpenPOWER on IntegriCloud