summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-12-02 17:41:43 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-12-02 17:41:43 +0000
commitfeab91cac3b6383a718eda2d404df600e1c90fe2 (patch)
tree76458660436f7b652e14c10dcfd4f31a7bd2fdbe /llvm
parent3939cf983f2347df0e91b01c096f5047ba8ba6ee (diff)
downloadbcm5719-llvm-feab91cac3b6383a718eda2d404df600e1c90fe2.tar.gz
bcm5719-llvm-feab91cac3b6383a718eda2d404df600e1c90fe2.zip
R600/SI: Set correct number of user sgprs for HSA runtime
We don't support scratch buffers yet with HSA. llvm-svn: 223130
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/R600/SIISelLowering.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/SIISelLowering.cpp b/llvm/lib/Target/R600/SIISelLowering.cpp
index 2733e09cd10..85ef37d99b1 100644
--- a/llvm/lib/Target/R600/SIISelLowering.cpp
+++ b/llvm/lib/Target/R600/SIISelLowering.cpp
@@ -489,7 +489,10 @@ SDValue SITargetLowering::LowerFormalArguments(
// The pointer to the list of arguments is stored in SGPR0, SGPR1
// The pointer to the scratch buffer is stored in SGPR2, SGPR3
if (Info->getShaderType() == ShaderType::COMPUTE) {
- Info->NumUserSGPRs = 4;
+ if (Subtarget->isAmdHsaOS())
+ Info->NumUserSGPRs = 2; // FIXME: Need to support scratch buffers.
+ else
+ Info->NumUserSGPRs = 4;
unsigned InputPtrReg =
TRI->getPreloadedValue(MF, SIRegisterInfo::INPUT_PTR);
OpenPOWER on IntegriCloud