1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

AddPhiIncoming valueless fix

This commit is contained in:
Brian Fiete 2024-02-22 06:52:31 -05:00
parent d1134ebfb8
commit a2f5517e5c

View file

@ -23235,8 +23235,10 @@ bool BfExprEvaluator::PerformBinaryOperation_NullCoalesce(BfTokenNode* opToken,
else
{
auto phi = mModule->mBfIRBuilder->CreatePhi(mModule->mBfIRBuilder->MapType(leftValue.mType), 2);
mModule->mBfIRBuilder->AddPhiIncoming(phi, leftValue.mValue, endLhsBB);
mModule->mBfIRBuilder->AddPhiIncoming(phi, rightValue.mValue, endRhsBB);
if (!leftValue.mType->IsValuelessType())
mModule->mBfIRBuilder->AddPhiIncoming(phi, leftValue.mValue, endLhsBB);
if (!rightValue.mType->IsValuelessType())
mModule->mBfIRBuilder->AddPhiIncoming(phi, rightValue.mValue, endRhsBB);
mResult = BfTypedValue(phi, leftValue.mType);
}