[flang-commits] [flang] 8a22651 - [flang] Build broken due to no member named 'getNumScalableDims' in 'mlir::VectorType' after D153412 (NFC)

Jie Fu via flang-commits flang-commits at lists.llvm.org
Wed Jun 28 06:47:21 PDT 2023


Author: Jie Fu
Date: 2023-06-28T21:46:08+08:00
New Revision: 8a2265189297e5b303712813c48e0f452d9f2bbd

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

LOG: [flang] Build broken due to no member named 'getNumScalableDims' in 'mlir::VectorType' after D153412 (NFC)

/data/llvm-project/flang/lib/Optimizer/Dialect/FIROps.cpp:971:46: error: no member named 'getNumScalableDims' in 'mlir::VectorType'
    if (mlir::dyn_cast<mlir::VectorType>(ty).getNumScalableDims() == 0)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
1 error generated.

Added: 
    

Modified: 
    flang/lib/Optimizer/Dialect/FIROps.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Optimizer/Dialect/FIROps.cpp b/flang/lib/Optimizer/Dialect/FIROps.cpp
index 7f899a2937987..61ba0f584ae6d 100644
--- a/flang/lib/Optimizer/Dialect/FIROps.cpp
+++ b/flang/lib/Optimizer/Dialect/FIROps.cpp
@@ -968,7 +968,7 @@ static std::optional<uint64_t> getVectorLen(mlir::Type ty) {
     return mlir::dyn_cast<fir::VectorType>(ty).getLen();
   else if (mlir::isa<mlir::VectorType>(ty)) {
     // fir.vector only supports 1-D vector
-    if (mlir::dyn_cast<mlir::VectorType>(ty).getNumScalableDims() == 0)
+    if (!(mlir::dyn_cast<mlir::VectorType>(ty).isScalable()))
       return mlir::dyn_cast<mlir::VectorType>(ty).getShape()[0];
   }
 


        


More information about the flang-commits mailing list