1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed some lowering of Win32 structs by value

This commit is contained in:
Brian Fiete 2020-03-09 11:46:40 -07:00
parent 611ab328d2
commit 686050a68b
4 changed files with 81 additions and 10 deletions

View file

@ -949,7 +949,15 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
int splatCount = checkType->GetSplatCount();
doSplat = ((checkType->IsSplattable()) && ((paramIdx != -1) || (!mMethodDef->mIsMutating)));
if ((int)paramTypes.size() + splatCount > module->mCompiler->mOptions.mMaxSplatRegs)
doSplat = false;
{
auto checkTypeInst = checkType->ToTypeInstance();
if ((checkTypeInst != NULL) && (checkTypeInst->mIsCRepr))
{
// CRepr splat means always splat
}
else
doSplat = false;
}
}
auto _AddType = [&](BfType* type)