[clang] [AMDGPU] Stop coercing structs with FP and int fields to integer arrays (PR #185083)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 07:52:57 PDT 2026
================
@@ -77,6 +77,54 @@ bool AMDGPUABIInfo::isHomogeneousAggregateSmallEnough(
return Members * NumRegs <= MaxNumRegsForArgsRet;
}
+/// Check if all fields in an aggregate type contain only sub-32-bit integer
+/// types. Such aggregates should be packed into i32 registers rather than
+/// passed as individual elements. Aggregates containing floats or full-sized
----------------
shiltian wrote:
Do we need to consider padding here? For example, what is the expected behavior when we have `{i8, i16, i32}` here?
https://github.com/llvm/llvm-project/pull/185083
More information about the cfe-commits
mailing list