[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 13:12:18 PST 2024
================
@@ -105,6 +105,11 @@ void AMDGPUABIInfo::computeInfo(CGFunctionInfo &FI) const {
if (!getCXXABI().classifyReturnType(FI))
FI.getReturnInfo() = classifyReturnType(FI.getReturnType());
+ // srets / indirect returns are unconditionally in the alloca AS.
+ if (FI.getReturnInfo().isIndirect())
+ FI.getReturnInfo().setIndirectAddrSpace(
+ getDataLayout().getAllocaAddrSpace());
----------------
arsenm wrote:
It's also ok to just hardcode to AMDGPUAS::PRIVATE_ADDRESS
https://github.com/llvm/llvm-project/pull/114062
More information about the cfe-commits
mailing list