[libclc] [libclc] add ctz built-in implementation to clc and generic (PR #135309)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 01:38:00 PDT 2025
https://github.com/frasercrmck approved this pull request.
LGTM.
I note that this uses `__OPENCL_C_VERSION__` which *technically* isn't available for OpenCL 1.0 or 1.1. However, clang defines this macro even for those versions, so we have a consistent version checking mechanism. See [here](https://github.com/llvm/llvm-project/blob/main/clang/lib/Frontend/InitPreprocessor.cpp#L551-L557). I think it's okay to depend on clang-specific behaviour. We already rely on `cl_clang_storage_class_specifiers`.
https://github.com/llvm/llvm-project/pull/135309
More information about the cfe-commits
mailing list