AMDGPU: Fix opaque pointer and other bugs in printf of constant strings
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 6 Jan 2023 19:02:24 +0000 (14:02 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 10 Jan 2023 18:39:44 +0000 (13:39 -0500)
commitfdda800ba35e435db45475c404b995de2d5ecbb8
tree3e70bb77488688c3ca012ab32633d2fb40d21250
parentfa3fa4d0d42326005dfd5887bf047b86904d3be6
AMDGPU: Fix opaque pointer and other bugs in printf of constant strings

Strip pointer casts to get to the global. Fixes not respecting indexed
constant strings. Tolerate non-null terminated and empty strings.
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
llvm/test/CodeGen/AMDGPU/opencl-printf.ll