[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

Romaric Jodin via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 5 10:35:52 PST 2024


================
@@ -0,0 +1,21 @@
+#ifndef __CLC_INTEGER_CLC_CLZ_H__
+#define __CLC_INTEGER_CLC_CLZ_H__
+
+#if defined(CLC_CLSPV) || defined(CLC_SPIRV)
+// clspv and spir-v targets provide their own OpenCL-compatible clz
+#define __clc_clz clz
----------------
rjodinchr wrote:

I don't think the size of the library matters too much.
For sure if we see better performance numbers with libclc implementation we would want to switch to them. But to be honest, when it comes to performance, the first thing we do is to forget about the accuracy and use native Vulkan operators, thus we use as libclc as little as possible in that case.

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


More information about the cfe-commits mailing list