1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed issue passing a splat arg to a params parameter

This commit is contained in:
Brian Fiete 2020-08-03 10:19:50 -07:00
parent e59cb10ed4
commit c7393865b4

View file

@ -5910,7 +5910,10 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
argValue = mModule->LoadValue(argValue);
auto firstAddr = mModule->mBfIRBuilder->CreateInBoundsGEP(expandedParamsArray.mValue, 0, firstElem->mDataIdx);
auto indexedAddr = mModule->CreateIndexedValue(argValue.mType, firstAddr, extendedParamIdx);
auto storeInst = mModule->mBfIRBuilder->CreateAlignedStore(argValue.mValue, indexedAddr, argValue.mType->mAlign);
if (argValue.IsSplat())
mModule->AggregateSplatIntoAddr(argValue, indexedAddr);
else
mModule->mBfIRBuilder->CreateAlignedStore(argValue.mValue, indexedAddr, argValue.mType->mAlign);
}
}
}