[all-commits] [llvm/llvm-project] b8a588: [libclc] Fix memory fence scope mapping for OpenCL...
Victor Mustya via All-commits
all-commits at lists.llvm.org
Wed Dec 3 17:13:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b8a5888d8d32246fd36d2f65bd917f03aa296e48
https://github.com/llvm/llvm-project/commit/b8a5888d8d32246fd36d2f65bd917f03aa296e48
Author: Victor Mustya <victor.mustya at intel.com>
Date: 2025-12-04 (Thu, 04 Dec 2025)
Changed paths:
M libclc/opencl/include/clc/opencl/synchronization/utils.h
Log Message:
-----------
[libclc] Fix memory fence scope mapping for OpenCL (#170542)
The function `__opencl_get_memory_scope` incorrectly assumed that the
Clang built-in `__MEMORY_SCOPE_*` macros defined as bitmasks, while they
are actually defined as distinct integer values. This led to incorrect
mapping of OpenCL memory fence flags to LLVM memory scopes, causing
issues in generated code.
The fix involves updating the `__opencl_get_memory_scope` function to
return the correct `__MEMORY_SCOPE_*` values based on the provided
`cl_mem_fence_flags`. Additionally, the `__opencl_get_memory_semantics`
and the `__opencl_get_memory_scope` functions are marked as `static`
to avoid potential multiple definition issues during linking.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list