KhronosGroup / SPIRV-LLVM-Translator

A tool and a library for bi-directional translation between SPIR-V and LLVM IR
Other
464 stars 208 forks source link

SPV_EXT_relaxed_printf_string_address_space allows format from too many address spaces #2583

Open LU-JOHN opened 2 months ago

LU-JOHN commented 2 months ago

Using --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space allows printf format strings from any address space, but https://github.com/pjaaskel/SPIRV-Registry/blob/2f4cb5fd64b189f8ab0ddeb770a2b67aade41613/extensions/EXT/SPV_EXT_relaxed_printf_string_address_space.asciidoc states:

"format must be a pointer(constant, global, local, private, generic) to i8."

In particular calls like: %4 = call spir_func i32 @_Z18__spirv_ocl_printfPU3AS1c(ptr addrspace(1) %3) #0 are accepted, but addrspace(1) maps to: ATTR_VOLATILE.