macurtis-amd 0c480dd4b6
[clang][CodeGen] cast addr space of ReturnValue if needed (#154380)
Fixes a bug on AMDGPU targets where a pointer was stored as address
space 5, but then loaded as address space 0.

Issue found as part of [Kokkos](https://github.com/kokkos/kokkos)
testing, specifically `hip.atomics` (see
[core/unit_test/TestAtomics.hpp](https://github.com/kokkos/kokkos/blob/develop/core/unit_test/TestAtomics.hpp)).

Issue was introduced by commit
[39ec9de7c230](https://github.com/llvm/llvm-project/commit/39ec9de7c230)
- [clang][CodeGen] sret args should always point to the alloca AS, so
use that (https://github.com/llvm/llvm-project/pull/114062).
2025-08-21 04:38:55 -05:00
..
2011-08-19 23:08:33 +00:00
2011-08-19 23:08:33 +00:00
2023-08-28 12:13:42 -04:00
2013-12-03 14:06:23 +00:00
2023-08-28 12:13:42 -04:00
2013-12-03 14:16:22 +00:00
2018-02-23 19:30:48 +00:00
2023-06-23 22:45:17 -07:00
2023-08-28 12:13:42 -04:00
2018-02-23 19:30:48 +00:00
2013-08-20 22:01:44 +00:00
2023-01-08 10:35:26 +01:00
2023-08-28 12:13:42 -04:00
2018-02-23 19:30:48 +00:00
2023-08-28 12:13:42 -04:00
2018-05-17 18:34:05 +00:00
2018-02-23 19:30:48 +00:00
2018-03-22 22:57:48 +00:00
2023-08-28 12:13:42 -04:00
2018-02-23 19:30:48 +00:00
2018-02-23 19:30:48 +00:00
2023-08-28 12:13:42 -04:00