Skip to content

[libclc] add ctz built-in implementation to clc and generic #135309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2025

Conversation

wenju-he
Copy link
Contributor

No description provided.

@wenju-he
Copy link
Contributor Author

@frasercrmck please help to review? thanks.

Copy link
Contributor

@frasercrmck frasercrmck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. I think it's okay to depend on clang-specific behaviour. We already rely on cl_clang_storage_class_specifiers.

@frasercrmck frasercrmck added the libclc libclc OpenCL library label Apr 15, 2025
@frasercrmck frasercrmck merged commit 5529024 into llvm:main Apr 15, 2025
10 checks passed
@wenju-he wenju-he deleted the libclc-ctz branch April 15, 2025 22:47
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libclc libclc OpenCL library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants