mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28: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 (underlyingArrayType == mModule->GetPrimitiveType(BfTypeCode_Boolean))
|
||||
underlyingArrayType = mModule->GetPrimitiveType(BfTypeCode_UInt8);
|
||||
irType = GetVectorType(MapType(underlyingArrayType), underlyingArraySize);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2244,9 +2244,15 @@ void BfIRCodeGen::HandleNextCmd()
|
|||
CMD_PARAM(BfIRTypeEx*, elementType);
|
||||
CMD_PARAM(int, length);
|
||||
|
||||
auto llvmType = elementType->mLLVMType;
|
||||
if (llvmType->getScalarSizeInBits() == 1)
|
||||
{
|
||||
llvmType = llvm::Type::getInt8Ty(*mLLVMContext);
|
||||
}
|
||||
|
||||
auto typeEx = new BfIRTypeEx();
|
||||
mIRTypeExs.Add(typeEx);
|
||||
typeEx->mLLVMType = llvm::FixedVectorType::get(elementType->mLLVMType, length);
|
||||
typeEx->mLLVMType = llvm::FixedVectorType::get(llvmType, length);
|
||||
typeEx->mMembers.Add(elementType);
|
||||
SetResult(curId, typeEx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue