You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix byref attribute loss: copy param attrs after clone_into!
CloneFunctionInto rebuilds the AttributeList from scratch using VMap.
For byref params, VMap maps old args to addrspacecast instructions
(not Arguments), so dyn_cast<Argument> fails and byref(T) is silently
dropped. The subsequent setAttributes() overwrites any attrs we set
before clone_into!.
Without byref, the backend emits global_buffer(8) metadata instead of
by_value(sizeof(T)), causing HIP to copy only 8 bytes of struct data
as a "pointer" — leading to illegal address errors at runtime.
Also remove InferAddressSpaces (rely on AMDGPULowerKernelArguments
in codegen to trace addrspacecast chains for s_load).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments