[all-commits] [llvm/llvm-project] 6a58ab: [ExpandVariadics] Don't lower unmangled C printf o...
Paulius Velesko via All-commits
all-commits at lists.llvm.org
Tue Aug 4 20:14:05 PDT 2026
Branch: refs/heads/release/23.x
Home: https://github.com/llvm/llvm-project
Commit: 6a58ab22a4d41277277f50e16d3b235c9d9010a6
https://github.com/llvm/llvm-project/commit/6a58ab22a4d41277277f50e16d3b235c9d9010a6
Author: Paulius Velesko <pvelesko at pglc.io>
Date: 2026-08-05 (Wed, 05 Aug 2026)
Changed paths:
M llvm/lib/Transforms/IPO/ExpandVariadics.cpp
A llvm/test/Transforms/ExpandVariadics/spirv-printf.ll
Log Message:
-----------
[ExpandVariadics] Don't lower unmangled C printf on SPIR-V (#206998)
An unmangled C `printf` declaration demangles to bare `printf` (no
argument list), so `SPIRV::ignoreFunction`'s `printf(` prefix check
missed it and ExpandVariadics packed its arguments into a vararg buffer;
the SPIR-V backend then passed the buffer pointer as printf's first
variadic operand, so device printf printed pointer values instead of the
actual arguments. Match the bare name too so OpenCL/HIP printf (emitted
unmangled) is left as a variadic call for the backend's OpenCL.std
printf lowering.
(cherry picked from commit b1d21c6d3121898dc13c0df8cf9e4410bee75cfb)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list