[llvm] [SPIR-V] Implement SPV_KHR_untyped_pointers extension (PR #201233)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 08:19:29 PDT 2026
================
@@ -185,9 +185,13 @@ static SPIRVTypeInst getArgSPIRVType(const Function &F, unsigned ArgIdx,
// spv_assign_ptr_type intrinsic or otherwise use default pointer element
// type.
if (hasPointeeTypeAttr(Arg)) {
+ // byval/byref/sret carry the aggregate layout in the pointee type, so keep
+ // a typed pointer here. An untyped one drops the type and breaks the
+ // argument ABI on the way back from SPIR-V.
return GR->getOrCreateSPIRVPointerType(
----------------
jmmartinez wrote:
Maybe we need a `getOrCreateSPIRVTypedPointerType`.The `ForcedType` meaning wasn't obvious at first.
https://github.com/llvm/llvm-project/pull/201233
More information about the llvm-commits
mailing list