[Mlir-commits] [mlir] d761e45 - Fix more build failures caused by f4257c5832aa51e960e7351929ca3d37031985b7

David Sherwood llvmlistbot at llvm.org
Fri Aug 28 07:14:07 PDT 2020


Author: David Sherwood
Date: 2020-08-28T15:08:59+01:00
New Revision: d761e456ce2317c527744359ea0ed897facf3e47

URL: https://github.com/llvm/llvm-project/commit/d761e456ce2317c527744359ea0ed897facf3e47
DIFF: https://github.com/llvm/llvm-project/commit/d761e456ce2317c527744359ea0ed897facf3e47.diff

LOG: Fix more build failures caused by f4257c5832aa51e960e7351929ca3d37031985b7

MLIR build failed after ElementCount refactoring - updated code to
call isScalable() and getKnownMinValue().

Added: 
    

Modified: 
    mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
index 18008c614bd5..e27650b3297d 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
@@ -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,


        


More information about the Mlir-commits mailing list