[libclc] [libclc] Move several integer functions to CLC library (PR #116786)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 20:04:12 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
----------------
arsenm wrote:
I don't really understand what's going on here, or how the comment is relevant (here and all the other cases).
Macros should be used for approximately nothing, but the generic implementation shouldn't depend on any reasoning about what spirv wants to do
https://github.com/llvm/llvm-project/pull/116786
More information about the cfe-commits
mailing list