We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffddff3 commit fa945e6Copy full SHA for fa945e6
clang/lib/CodeGen/TargetInfo.cpp
@@ -9425,10 +9425,9 @@ void AMDGPUTargetCodeGenInfo::setTargetAttributes(
9425
if (IsHIPKernel)
9426
F->addFnAttr("uniform-work-group-size", "true");
9427
9428
- const bool IsSYCLKernel =
9429
- FD && M.getLangOpts().SYCLIsDevice &&
9430
- F->getCallingConv() == llvm::CallingConv::AMDGPU_KERNEL;
9431
// Create !{<func-ref>, metadata !"kernel", i32 1} node for SYCL kernels.
+ const bool IsSYCLKernel =
+ FD && M.getLangOpts().SYCLIsDevice && FD->hasAttr<SYCLKernelAttr>();
9432
if (IsSYCLKernel)
9433
addAMDGCNMetadata(F, "kernel", 1);
9434
0 commit comments