https://github.com/vmustya created 
https://github.com/llvm/llvm-project/pull/170208

The `bitfield_insert` function in the OpenCL C library had an incorrect
`__CLC_BODY` definition, that included the `.inc` file for the
`__clc_bitfield_insert` declaration instead of the correct
implementation. So, the function was not defined at all, leading to
linker errors when trying to use it.

>From c5989ff78119d62fbd9a2f8f4752436792a3f5ca Mon Sep 17 00:00:00 2001
From: Victor Mustya <[email protected]>
Date: Mon, 1 Dec 2025 13:45:45 -0800
Subject: [PATCH] [libclc] Fix bitfield_insert implementation

The `bitfield_insert` function in the OpenCL C library had an incorrect
`__CLC_BODY` definition, that included the `.inc` file for the
`__clc_bitfield_insert` declaration instead of the correct
implementation. So, the function was not defined at all, leading to
linker errors when trying to use it.
---
 libclc/opencl/lib/generic/integer/bitfield_insert.cl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libclc/opencl/lib/generic/integer/bitfield_insert.cl 
b/libclc/opencl/lib/generic/integer/bitfield_insert.cl
index c165bd756ffef..f6d0aea96d8ec 100644
--- a/libclc/opencl/lib/generic/integer/bitfield_insert.cl
+++ b/libclc/opencl/lib/generic/integer/bitfield_insert.cl
@@ -12,7 +12,7 @@
 #include <clc/opencl/integer/bitfield_insert.h>
 
 #define __CLC_FUNCTION bitfield_insert
-#define __CLC_BODY <clc/integer/clc_bitfield_insert.inc>
+#define __CLC_BODY <bitfield_insert.inc>
 #include <clc/integer/gentype.inc>
 
 #endif // cl_khr_extended_bit_ops

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to