[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 29 04:05:40 PST 2024
================
@@ -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:
This does not belong here and has nothing to do with AMDGPU
https://github.com/llvm/llvm-project/pull/72556
More information about the cfe-commits
mailing list