[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
Tue Dec 10 06:19:16 PST 2024


================
@@ -225,7 +225,9 @@ ABIArgInfo AMDGPUABIInfo::classifyArgumentType(QualType Ty, bool Variadic,
     // Records with non-trivial destructors/copy-constructors should not be
     // passed by value.
     if (auto RAA = getRecordArgABI(Ty, getCXXABI()))
-      return getNaturalAlignIndirect(Ty, RAA == CGCXXABI::RAA_DirectInMemory);
+      return getNaturalAlignIndirect(
+          Ty, getContext().getTargetAddressSpace(LangAS::Default),
+          RAA == CGCXXABI::RAA_DirectInMemory);
----------------
AlexVlx wrote:

This is not intended to alter current behaviour, as without this patch non aliased indirect args wouldn't carry an AS, so it's just dealing with the interface extension for `getIndirect` / `getNaturalAlignIndirect`.

https://github.com/llvm/llvm-project/pull/114062


More information about the cfe-commits mailing list