[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 9 03:44:49 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());
----------------
AlexVlx wrote:
@rjmccall are you OK with the current solution (@arsenm appears to be)?
https://github.com/llvm/llvm-project/pull/114062
More information about the cfe-commits
mailing list