================ @@ -3616,6 +3617,12 @@ unsigned FunctionDecl::getBuiltinID(bool ConsiderWrapperFunctions) const { if (!ConsiderWrapperFunctions && getStorageClass() == SC_Static) return 0; + // AMDGCN implementation supports printf as a builtin + // for OpenCL + if (Context.getTargetInfo().getTriple().isAMDGCN() && + Context.getLangOpts().OpenCL && BuiltinID == AMDGPU::BIprintf) + return BuiltinID; ---------------- arsenm wrote:
> . Meanwhile, can this go ahead as an AMDGPU specific workaround for now so > that we have the intended feature in place No. That cleanup will never happen. > PS :Ah, I see another issue . OpenCL v1.2 s6.9.f states none of the functions > defined in C99 headers are available. This would mean std printf is supposed > to be treated differently than OpenCL builtins and consequently the builtin > IDs assigned to them "need" to be different That's not what that means https://github.com/llvm/llvm-project/pull/72556 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits