Skip to content

Commit e814b0a

Browse files
committed
GPU: Temporary workaround for bug in llvm IL to SPIR-V converter needed for OpenCL2
1 parent 1991e03 commit e814b0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GPU/Common/GPUCommonMath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ GPUhdi() unsigned int GPUCommonMath::Clz(unsigned int x)
138138

139139
GPUhdi() unsigned int GPUCommonMath::Popcount(unsigned int x)
140140
{
141-
#if (defined(__GNUC__) || defined(__clang__) || defined(__CUDACC__) || defined(__HIPCC__)) && (!defined(__OPENCL__) || defined(__OPENCLCPP__))
141+
#if (defined(__GNUC__) || defined(__clang__) || defined(__CUDACC__) || defined(__HIPCC__)) && (!defined(__OPENCL__) /*|| defined(__OPENCLCPP__)*/) // TODO: remove OPENCLCPP workaround when reported SPIR-V bug is fixed
142142
return CHOICE(__builtin_popcount(x), __popc(x), __builtin_popcount(x)); // use builtin if available
143143
#else
144144
unsigned int retVal = 0;

0 commit comments

Comments
 (0)