[llvm] r223130 - R600/SI: Set correct number of user sgprs for HSA runtime
Tom Stellard
thomas.stellard at amd.com
Tue Dec 2 09:41:43 PST 2014
Author: tstellar
Date: Tue Dec 2 11:41:43 2014
New Revision: 223130
URL: http://llvm.org/viewvc/llvm-project?rev=223130&view=rev
Log:
R600/SI: Set correct number of user sgprs for HSA runtime
We don't support scratch buffers yet with HSA.
Modified:
llvm/trunk/lib/Target/R600/SIISelLowering.cpp
Modified: llvm/trunk/lib/Target/R600/SIISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIISelLowering.cpp?rev=223130&r1=223129&r2=223130&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIISelLowering.cpp Tue Dec 2 11:41:43 2014
@@ -489,7 +489,10 @@ SDValue SITargetLowering::LowerFormalArg
// 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);
More information about the llvm-commits
mailing list