================
@@ -441,7 +441,8 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes(
   const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D);
   if (FD) {
     setFunctionDeclAttributes(FD, F, M);
-    if (FD->hasAttr<DeviceKernelAttr>() && !M.getLangOpts().OpenCL)
+    if (FD->hasAttr<DeviceKernelAttr>() &&
+        !GV->getName().starts_with("__clang_ocl_kern_imp_"))
----------------
XChy wrote:

Yep, I think this code in setTargetAttributes is redundant. Removing this code 
from AMDGPU/NVPTX/SPIRV works too, except for attributes like 
`[[clang::amdgpu_kernel]]`. Fix it in SemaType now.

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

Reply via email to