1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixes NaN comparisons

This commit is contained in:
Brian Fiete 2024-10-16 13:25:17 -04:00
parent 7c0293620a
commit 55298ee884
8 changed files with 256 additions and 38 deletions

View file

@ -10126,7 +10126,17 @@ BfIRValue BfModule::AllocFromType(BfType* type, const BfAllocTarget& allocTarget
{
if ((mBfIRBuilder->mIgnoreWrites) ||
((mCompiler->mIsResolveOnly) && (!mIsComptimeModule)))
return GetDefaultValue(typeInstance);
{
if (mBfIRBuilder->mIgnoreWrites)
{
return GetDefaultValue(typeInstance);
}
else
{
// Fake with alloca
return mBfIRBuilder->CreateAlloca(allocType);
}
}
auto classVDataType = ResolveTypeDef(mCompiler->mClassVDataTypeDef);
auto vData = mBfIRBuilder->CreateBitCast(vDataRef, mBfIRBuilder->MapTypeInstPtr(classVDataType->ToTypeInstance()));