[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)
Vikram Hegde via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 04:26:04 PDT 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;
----------------
vikramRH wrote:
ping @arsenm
https://github.com/llvm/llvm-project/pull/72556
More information about the llvm-commits
mailing list