diff options
| author | Tom Stellard <thomas.stellard@amd.com> | 2014-12-02 17:41:43 +0000 |
|---|---|---|
| committer | Tom Stellard <thomas.stellard@amd.com> | 2014-12-02 17:41:43 +0000 |
| commit | feab91cac3b6383a718eda2d404df600e1c90fe2 (patch) | |
| tree | 76458660436f7b652e14c10dcfd4f31a7bd2fdbe /llvm/lib/Target/R600/SIISelLowering.cpp | |
| parent | 3939cf983f2347df0e91b01c096f5047ba8ba6ee (diff) | |
| download | bcm5719-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/lib/Target/R600/SIISelLowering.cpp')
| -rw-r--r-- | llvm/lib/Target/R600/SIISelLowering.cpp | 5 |
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); |

