[PATCH] D20728: AMDGPU: Disable AMDGPU for shader calling conventions.

Bas Nieuwenhuizen via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 05:54:42 PDT 2016

bnieuwenhuizen created this revision.
bnieuwenhuizen added reviewers: tstellarAMD, arsenm.
bnieuwenhuizen added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm.

The work item intrinsics are not available for the shader
calling conventions. And even if we did hook them up most
shader stages haves some extra restrictions on the amount
of available LDS.



Index: lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
--- lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+++ lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
@@ -121,7 +121,7 @@
 bool AMDGPUPromoteAlloca::runOnFunction(Function &F) {
-  if (!TM || skipFunction(F))
+  if (!TM || skipFunction(F) || AMDGPU::isShader(F.getCallingConv()))
     return false;
   FunctionType *FTy = F.getFunctionType();

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20728.58774.patch
Type: text/x-patch
Size: 457 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160527/dd104648/attachment.bin>

More information about the llvm-commits mailing list