Skip to content

Commit 91ff3c6

Browse files
PiotrFusiksys_zuul
authored andcommitted
Fix endless loop in LegalizeFunctionSignatures.
Change-Id: I7b3b17dc8747d98a6b3cd1c8904e5b8dfc755777
1 parent 9b8606f commit 91ff3c6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

IGC/AdaptorCommon/LegalizeFunctionSignatures.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,16 @@ inline bool isLegalIntVectorType(Module& M, Type* ty)
125125
if (ty->isVectorTy() && ty->getVectorElementType()->isIntegerTy())
126126
{
127127
unsigned size = (unsigned)M.getDataLayout().getTypeSizeInBits(ty->getVectorElementType());
128-
return M.getDataLayout().isLegalInteger(size);
128+
switch (size)
129+
{
130+
case 8:
131+
case 16:
132+
case 32:
133+
case 64:
134+
return true;
135+
default:
136+
return false;
137+
}
129138
}
130139
return true;
131140
}

0 commit comments

Comments
 (0)