Won't ship as is, testing in progress. Posting to collaborate with @jhuber6 on libc testing. snprintf passing at present. Commit message will change from this.
I'm looking to implement this as an ABI lowering for amdgpu (possibly nvptx) so those backends don't have to consider variadic functions, and as an optimisation for x64/aarch64 etc.
Split of the libc stuff into a separate patch, the lowering pass should be a standalone change