mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
bool vector improvements
This commit is contained in:
parent
b2078b10fe
commit
1da0c3cae7
2 changed files with 7 additions and 3 deletions
|
@ -3093,8 +3093,6 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
|
||||||
{
|
{
|
||||||
if (underlyingArrayIsVector)
|
if (underlyingArrayIsVector)
|
||||||
{
|
{
|
||||||
if (underlyingArrayType == mModule->GetPrimitiveType(BfTypeCode_Boolean))
|
|
||||||
underlyingArrayType = mModule->GetPrimitiveType(BfTypeCode_UInt8);
|
|
||||||
irType = GetVectorType(MapType(underlyingArrayType), underlyingArraySize);
|
irType = GetVectorType(MapType(underlyingArrayType), underlyingArraySize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -2244,9 +2244,15 @@ void BfIRCodeGen::HandleNextCmd()
|
||||||
CMD_PARAM(BfIRTypeEx*, elementType);
|
CMD_PARAM(BfIRTypeEx*, elementType);
|
||||||
CMD_PARAM(int, length);
|
CMD_PARAM(int, length);
|
||||||
|
|
||||||
|
auto llvmType = elementType->mLLVMType;
|
||||||
|
if (llvmType->getScalarSizeInBits() == 1)
|
||||||
|
{
|
||||||
|
llvmType = llvm::Type::getInt8Ty(*mLLVMContext);
|
||||||
|
}
|
||||||
|
|
||||||
auto typeEx = new BfIRTypeEx();
|
auto typeEx = new BfIRTypeEx();
|
||||||
mIRTypeExs.Add(typeEx);
|
mIRTypeExs.Add(typeEx);
|
||||||
typeEx->mLLVMType = llvm::FixedVectorType::get(elementType->mLLVMType, length);
|
typeEx->mLLVMType = llvm::FixedVectorType::get(llvmType, length);
|
||||||
typeEx->mMembers.Add(elementType);
|
typeEx->mMembers.Add(elementType);
|
||||||
SetResult(curId, typeEx);
|
SetResult(curId, typeEx);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue