[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)
Sameer Sahasrabuddhe via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 20 22:18:46 PST 2024
================
@@ -199,15 +214,31 @@ RValue CodeGenFunction::EmitAMDGPUDevicePrintfCallExpr(const CallExpr *E) {
}
llvm::Value *Arg = A.getRValue(*this).getScalarVal();
+ if (isString(A.getType().getTypePtr()) && CGM.getLangOpts().OpenCL)
----------------
ssahasra wrote:
The typecast can be inserted later when the arguments are actually processed. At that point, we already know which args are strings because we have parsed the format string.
https://github.com/llvm/llvm-project/pull/72556
More information about the cfe-commits
mailing list