[llvm] [clang] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

Sameer Sahasrabuddhe via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 02:05:27 PST 2023


================
@@ -406,5 +410,9 @@ TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_fp8_f32, "iffiIb", "nc", "fp8-insts")
 TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf8_f32, "ifiiIi", "nc", "fp8-insts")
 TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_fp8_f32, "ifiiIi", "nc", "fp8-insts")
 
+// OpenCL
+LANGBUILTIN(printf, "icC*4.", "fp:0:", ALL_OCL_LANGUAGES)
----------------
ssahasra wrote:

Although we talked about this offline, the explanation needs to be added here. In fact, the motivation for having this builtin should be added as a comment to the source itself for future reference.

https://github.com/llvm/llvm-project/pull/72556


More information about the cfe-commits mailing list