Skip to content

Conversation

@frasercrmck
Copy link
Contributor

The half variants were missing but are trivial to implement. There were some incorrect mixed type overloads (step(float, double)) which aren't in the OpenCL specification and so have been removed.

Like certain other builtins the CLC step function only deals with identical types. The OpenCL layer is responsible for casting the scalar argument to a vector.

This commit also trivially vectorizes the CLC function, generating better bytecode.

The half variants were missing but are trivial to implement. There were
some incorrect mixed type overloads (step(float, double)) which aren't
in the OpenCL specification and so have been removed.

Like certain other builtins the CLC step function only deals with
identical types. The OpenCL layer is responsible for casting the scalar
argument to a vector.

This commit also trivially vectorizes the CLC function, generating
better bytecode.
@frasercrmck frasercrmck requested a review from arsenm May 21, 2025 17:35
@frasercrmck frasercrmck added the libclc libclc OpenCL library label May 21, 2025
@frasercrmck frasercrmck merged commit 9fa81a4 into llvm:main May 22, 2025
11 checks passed
@frasercrmck frasercrmck deleted the libclc-clc-step branch May 22, 2025 08:54
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