[all-commits] [llvm/llvm-project] c16297: [CUDA][HIP] Fix host/device attribute of builtin (...
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Wed May 7 19:03:54 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c16297cd3f0ed9d036e9cf16fb6885aa3c72d5d3
https://github.com/llvm/llvm-project/commit/c16297cd3f0ed9d036e9cf16fb6885aa3c72d5d3
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2025-05-07 (Wed, 07 May 2025)
Changed paths:
M clang/lib/Sema/SemaExpr.cpp
A clang/test/SemaCUDA/overloaded-builtin.cu
Log Message:
-----------
[CUDA][HIP] Fix host/device attribute of builtin (#138162)
When a builtin function is passed a pointer with a different
address space, clang creates an overloaded
builtin function but does not copy the host/device attribute. This
causes
error when the builtin is called by device functions
since CUDA/HIP relies on the host/device attribute to treat
a builtin function as callable on both host and device
sides.
Fixed by copying the host/device attribute of the original
builtin function to the created overloaded builtin function.
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