[Mlir-commits] [mlir] 58809a1 - [mlir][memref][NFC] Silence compiler warnings

Matthias Springer llvmlistbot at llvm.org
Tue Jul 5 08:02:07 PDT 2022


Author: Matthias Springer
Date: 2022-07-05T17:01:40+02:00
New Revision: 58809a1eb1afcc35bc32ec91020eabdc57b046a4

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

LOG: [mlir][memref][NFC] Silence compiler warnings

Added: 
    

Modified: 
    mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index 8e54936cd43c..aa4cf740447a 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -2153,8 +2153,9 @@ Type SubViewOp::inferRankReducedResultType(ArrayRef<int64_t> resultShape,
   auto inferredType =
       inferResultType(sourceRankedTensorType, offsets, sizes, strides)
           .cast<MemRefType>();
-  assert(inferredType.getRank() >= resultShape.size() && "expected ");
-  if (inferredType.getRank() == resultShape.size())
+  assert(inferredType.getRank() >= static_cast<int64_t>(resultShape.size()) &&
+         "expected ");
+  if (inferredType.getRank() == static_cast<int64_t>(resultShape.size()))
     return inferredType;
 
   // Compute which dimensions are dropped.


        


More information about the Mlir-commits mailing list