mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed append alloc array size calculation
This commit is contained in:
parent
234b3591eb
commit
826a7e6fba
1 changed files with 2 additions and 2 deletions
|
@ -617,7 +617,7 @@ public:
|
|||
{
|
||||
curAlign = resultType->mAlign;
|
||||
EmitAppendAlign(resultType->mAlign);
|
||||
sizeValue = mModule->mBfIRBuilder->CreateMul(mModule->GetConstValue(resultType->mSize), allocCount);
|
||||
sizeValue = mModule->mBfIRBuilder->CreateMul(mModule->GetConstValue(resultType->GetStride()), allocCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -633,7 +633,7 @@ public:
|
|||
int arrayClassSize = arrayType->mInstSize - firstElementField->mDataSize;
|
||||
|
||||
sizeValue = mModule->GetConstValue(arrayClassSize);
|
||||
BfIRValue elementDataSize = mModule->mBfIRBuilder->CreateMul(mModule->GetConstValue(resultType->mSize), allocCount);
|
||||
BfIRValue elementDataSize = mModule->mBfIRBuilder->CreateMul(mModule->GetConstValue(resultType->GetStride()), allocCount);
|
||||
sizeValue = mModule->mBfIRBuilder->CreateAdd(sizeValue, elementDataSize);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue