[clang] [AMDGPU] Stop coercing structs with FP and int fields to integer arrays (PR #185083)
Gang Chen via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 21:01:54 PDT 2026
cmc-rep wrote:
> > The behavior change (fp16 structs no longer packed to i32) is intentional - we preserve float types now.
> > However, I understand the concern about packing efficiency.. A potential solution would be to pack uniform float structs into vector types instead(if i am correct..):
> > {__fp16, __fp16} to <2 x half> (instead of i32 or {half, half}) {float, float} to <2 x float> (instead of [2 x i32] or {float, float})
> > This would:
> >
> > * Preserve float type information
> > * Pack into a single value/register
> > * Enable SIMD optimizations
> >
Thanks for the explanation. Yes, I am getting a lot more <2 x half> or <4 x half> now.
With some more investigation, looks like the problem is at our end in handling those half-vector. Sorry for the noise.
https://github.com/llvm/llvm-project/pull/185083
More information about the cfe-commits
mailing list