================ @@ -607,8 +608,13 @@ void CodeGenModule::handleAMDGPUFlatWorkGroupSizeAttr( if (Min != 0) { assert(Min <= Max && "Min must be less than or equal Max"); + if (MinThreadsVal) + *MinThreadsVal = Min; + if (MaxThreadsVal) + *MaxThreadsVal = Max; std::string AttrVal = llvm::utostr(Min) + "," + llvm::utostr(Max); - F->addFnAttr("amdgpu-flat-work-group-size", AttrVal); + if (F) ---------------- jdoerfert wrote:
In the commit I call the function with a nullptr to get the Min/Max values out and while preserving all the reasoning that may impact them. https://github.com/llvm/llvm-project/pull/70247 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits