[PATCH] D140558: AMDGPU: Fix broken and permissive handling of printf format strings
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 04:51:44 PST 2023
arsenm added a comment.
In D140558#4025024 <https://reviews.llvm.org/D140558#4025024>, @sameerds wrote:
> This pass is used only by OpenCL on AMDGPU. We don't really need to handle errors at the LLVM IR level, since Clang will have already validated the printf call under the OpenCL spec. It's sufficient to just return -1 on anything invalid according to OpenCL printf spec.
This is operating on IR, it needs to handle the whole IR. This isn't diagnosing end user errors, but everything that could have happened to the IR in and after the emission in clang. It needs to validate it's handling only exactly what's expected from clang.
> If we really should keep this check, can you please make sure it passes internal OpenCL builds on AMDGPU?
Yes, but the printf testing is clearly not worth anything since it didn't catch any of these opaque pointer issues
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140558/new/
https://reviews.llvm.org/D140558
More information about the llvm-commits
mailing list