Explicitly address space cast the pointer if its address space differs
from the address space of the parameter.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/CodeGenHIP/unsafe-atomic-ops-gfx90a.hip | ||
---|---|---|
14 | I think we want to check the pointer argument passed to the atomic intrinsics to make sure they have addr space cast if needed. That's what your patch changes. |
clang/lib/CodeGen/CGBuiltin.cpp | ||
---|---|---|
15764 | In https://reviews.llvm.org/D102405 you already inserted an addr space cast in AST when you pass a pointer to default addr space to a builtin expecting a pointer to non-default addr space. This addr space cast in AST will be emitted as addr space cast in IR. Why do you still need to insert addr space cast here? |
In https://reviews.llvm.org/D102405 you already inserted an addr space cast in AST when you pass a pointer to default addr space to a builtin expecting a pointer to non-default addr space. This addr space cast in AST will be emitted as addr space cast in IR. Why do you still need to insert addr space cast here?