================
@@ -419,9 +419,11 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes(
     return;
 
   const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D);
-  if (FD)
+  if (FD) {
     setFunctionDeclAttributes(FD, F, M);
-
+    if (FD->hasAttr<DeviceKernelAttr>() && !M.getLangOpts().OpenCL)
+      F->setCallingConv(llvm::CallingConv::AMDGPU_KERNEL);
----------------
jhuber6 wrote:

Does OpenCL use a different kernel calling convention? I remember there was 
something different for Mesa or something but I don't know why OpenCL wouldn't 
work here.

https://github.com/llvm/llvm-project/pull/161905
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to