Fix more build failures caused by f4257c5832

MLIR build failed after ElementCount refactoring - updated code to
call isScalable() and getKnownMinValue().
This commit is contained in:
David Sherwood 2020-08-28 15:08:46 +01:00
parent 4b1a55a92f
commit d761e456ce
1 changed files with 3 additions and 2 deletions

View File

@ -58,8 +58,9 @@ llvm::TypeSize LLVMType::getPrimitiveSizeInBits() {
llvm::ElementCount elementCount = t.getElementCount();
assert(!elementSize.isScalable() &&
"vector type should have fixed-width elements");
return llvm::TypeSize(elementSize.getFixedSize() * elementCount.Min,
elementCount.Scalable);
return llvm::TypeSize(elementSize.getFixedSize() *
elementCount.getKnownMinValue(),
elementCount.isScalable());
})
.Default([](LLVMType ty) {
assert((ty.isa<LLVMVoidType, LLVMLabelType, LLVMMetadataType,