[libclc] libclc: do not use int64 in sincos helpers (PR #188056)

Romaric Jodin via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 26 06:10:18 PDT 2026


rjodinchr wrote:

> But I guess there would be large scale compile fails as long and ulong is widely used in libclc.

>From what I've seen, it is mostly used for builtins with long/ulong in their argument.
long/ulong are not used anywhere else to implement int32/fp32 builtins to my knowledge.

> It might be worthy to build a new variant of clspirv that disables __opencl_c_int64 for device that don't support int64. The default clspv build can enable __opencl_c_int64.

That would not be acceptable for clspv with the current implementation, as it would mean a large increase of disk space for the library.

> Perhaps the guard macro should be generalized to #ifndef __opencl_c_int64?

I'm fine with that, that would also clspv to always use the int32 version.

https://github.com/llvm/llvm-project/pull/188056


More information about the cfe-commits mailing list