[clang] [AMDGPU] Treat printf as builtin for OpenCL (PR #72554)

Sameer Sahasrabuddhe via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 19 22:53:26 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:

I still don't see why this is necessary. A target-defined language-specific builtin is a whole new beast. What is missing in the current parsing of OpenCL printf?

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


More information about the cfe-commits mailing list