KhronosGroup / SPIRV-LLVM-Translator

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

Ensure 'printf' is translated to a printf extended insn #2581

Closed LU-JOHN closed 4 months ago

LU-JOHN commented 4 months ago

Calls to printf can generated by a user call to __builtin_printf. Represent this in SPIRV with a printf extended insn instead of a SPIRV call to "printf". A SPIRV call to a variadic function will fail in spirv-val.

LU-JOHN commented 4 months ago

spirv-val testing in this PR requires changes in https://github.com/KhronosGroup/SPIRV-Tools/pull/5677