Skip to content

Commit a6d35e7

Browse files
dlei6gigcbot
authored andcommitted
Fixed struct arg size bug
IGC stackcall spec limits struct argument promotion from pass-by-reference to pass-by-value, to 64-bits and 128-bits respectively for function return values and arguments. This fixes a minor bug that cause promotion to fail at those sizes.
1 parent 7b3b270 commit a6d35e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IGC/AdaptorCommon/LegalizeFunctionSignatures.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ inline bool isPromotableStructType(const Module& M, const Type* ty, bool isRetur
151151
if (ty->isPointerTy())
152152
{
153153
StructType* sTy = dyn_cast<StructType>(ty->getPointerElementType());
154-
if (sTy && DL.getStructLayout(sTy)->getSizeInBits() < maxSize)
154+
if (sTy && DL.getStructLayout(sTy)->getSizeInBits() <= maxSize)
155155
{
156156
for (const auto* EltTy : sTy->elements())
157157
{

0 commit comments

Comments
 (0)