[Mlir-commits] [mlir] 4b1a55a - Fix build failures caused by f4257c5832aa51e960e7351929ca3d37031985b7

David Sherwood llvmlistbot at llvm.org
Fri Aug 28 06:57:04 PDT 2020


Author: David Sherwood
Date: 2020-08-28T14:56:01+01:00
New Revision: 4b1a55a92f9e44440d50fb17d82f5a38e078e534

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

LOG: Fix build failures caused by f4257c5832aa51e960e7351929ca3d37031985b7

Added: 
    

Modified: 
    mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
index a5d833893879..bd93c00409ef 100644
--- a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
+++ b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
@@ -183,14 +183,14 @@ Type Importer::getStdTypeForAttr(LLVMType type) {
   // LLVM vectors can only contain scalars.
   if (type.isVectorTy()) {
     auto numElements = type.getVectorElementCount();
-    if (numElements.Scalable) {
+    if (numElements.isScalable()) {
       emitError(unknownLoc) << "scalable vectors not supported";
       return nullptr;
     }
     Type elementType = getStdTypeForAttr(type.getVectorElementType());
     if (!elementType)
       return nullptr;
-    return VectorType::get(numElements.Min, elementType);
+    return VectorType::get(numElements.getKnownMinValue(), elementType);
   }
 
   // LLVM arrays can contain other arrays or vectors.
@@ -208,11 +208,11 @@ Type Importer::getStdTypeForAttr(LLVMType type) {
     if (type.getArrayElementType().isVectorTy()) {
       LLVMType vectorType = type.getArrayElementType();
       auto numElements = vectorType.getVectorElementCount();
-      if (numElements.Scalable) {
+      if (numElements.isScalable()) {
         emitError(unknownLoc) << "scalable vectors not supported";
         return nullptr;
       }
-      shape.push_back(numElements.Min);
+      shape.push_back(numElements.getKnownMinValue());
 
       Type elementType = getStdTypeForAttr(vectorType.getVectorElementType());
       if (!elementType)


        


More information about the Mlir-commits mailing list