summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
diff options
context:
space:
mode:
authorMarek Olsak <marek.olsak@amd.com>2015-03-09 15:48:09 +0000
committerMarek Olsak <marek.olsak@amd.com>2015-03-09 15:48:09 +0000
commit4d00dd2b93765964b4478bed3076479267acf8ac (patch)
treed298ff22474c6afe377451b5d97dc514185afd0c /llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
parentf119679e2d49ad623dc71f5f6c2c33a4113fcad4 (diff)
downloadbcm5719-llvm-4d00dd2b93765964b4478bed3076479267acf8ac.tar.gz
bcm5719-llvm-4d00dd2b93765964b4478bed3076479267acf8ac.zip
R600/SI: Limit SGPRs to 80 on Tonga and Iceland
This is a candidate for stable. llvm-svn: 231659
Diffstat (limited to 'llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
index 92bc3142d1f..5e1b6a37e8f 100644
--- a/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
+++ b/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp
@@ -339,6 +339,13 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
ProgInfo.NumVGPR = MaxVGPR + 1;
ProgInfo.NumSGPR = MaxSGPR + 1;
+ if (STM.hasSGPRInitBug()) {
+ if (ProgInfo.NumSGPR > AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG)
+ llvm_unreachable("Too many SGPRs used with the SGPR init bug");
+
+ ProgInfo.NumSGPR = AMDGPUSubtarget::FIXED_SGPR_COUNT_FOR_INIT_BUG;
+ }
+
ProgInfo.VGPRBlocks = (ProgInfo.NumVGPR - 1) / 4;
ProgInfo.SGPRBlocks = (ProgInfo.NumSGPR - 1) / 8;
// Set the value to initialize FP_ROUND and FP_DENORM parts of the mode
OpenPOWER on IntegriCloud