Skip to content

Commit aaff6dd

Browse files
committed
Handled further review comments
1 parent 73e2715 commit aaff6dd

File tree

3 files changed

+256
-194
lines changed

3 files changed

+256
-194
lines changed

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,10 @@ TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_fp8_f32, "iffiIb", "nc", "fp8-insts")
410410
TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf8_f32, "ifiiIi", "nc", "fp8-insts")
411411
TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_fp8_f32, "ifiiIi", "nc", "fp8-insts")
412412

413-
// OpenCL
413+
// OpenCL printf has the following signature
414+
// int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2)));
415+
// The "__constant" address space corresponds to number 4 in LLVM IR for AMDGPU.
416+
// Following entry makes sure printf is recognized as builtin for OCL inputs.
414417
LANGBUILTIN(printf, "icC*4.", "fp:0:", ALL_OCL_LANGUAGES)
415418

416419
#undef BUILTIN

0 commit comments

Comments
 (0)