Skip to content

Commit 47b927a

Browse files
committed
Handled further review comments
1 parent e05ffbd commit 47b927a

File tree

3 files changed

+256
-193
lines changed

3 files changed

+256
-193
lines changed

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,10 @@ TARGET_BUILTIN(__builtin_amdgcn_swmmac_f32_16x16x32_fp8_bf8_w64, "V4fiV2iV4fs",
503503
TARGET_BUILTIN(__builtin_amdgcn_swmmac_f32_16x16x32_bf8_fp8_w64, "V4fiV2iV4fs", "nc", "gfx12-insts,wavefrontsize64")
504504
TARGET_BUILTIN(__builtin_amdgcn_swmmac_f32_16x16x32_bf8_bf8_w64, "V4fiV2iV4fs", "nc", "gfx12-insts,wavefrontsize64")
505505
// OpenCL
506+
// OpenCL printf has the following signature
507+
// int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2)));
508+
// The "__constant" address space corresponds to number 4 in LLVM IR for AMDGPU.
509+
// Following entry makes sure printf is recognized as builtin for OCL inputs.
506510
LANGBUILTIN(printf, "icC*4.", "fp:0:", ALL_OCL_LANGUAGES)
507511

508512
#undef BUILTIN

0 commit comments

Comments
 (0)