================
@@ -347,8 +347,28 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes(
   const bool IsHIPKernel = M.getLangOpts().HIP && 
FD->hasAttr<CUDAGlobalAttr>();
 
   const auto *FlatWGS = FD->getAttr<AMDGPUFlatWorkGroupSizeAttr>();
+
+  // The CUDA __launch_bounds__ arguments are honored only if the equivalent
+  // native amdgpu_flat_work_group_size / amdgpu_waves_per_eu attribute was not
+  // also spelled out; those take precedence.
+  const auto *LaunchBounds = FD->getAttr<CUDALaunchBoundsAttr>();
----------------
arsenm wrote:

It turns out nothing enforces this and NVPTX silently ignores it on device 
functions 

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

Reply via email to