[Mlir-commits] [mlir] 4907cfe - [mlir][MemRef] Fix warning on unsigned comparison
Stella Stamenova
llvmlistbot at llvm.org
Wed Mar 23 12:55:26 PDT 2022
Author: Nathaniel McVicar
Date: 2022-03-23T12:47:04-07:00
New Revision: 4907cfe2cb67dad5479c6064143ce5afa958af83
URL: https://github.com/llvm/llvm-project/commit/4907cfe2cb67dad5479c6064143ce5afa958af83
DIFF: https://github.com/llvm/llvm-project/commit/4907cfe2cb67dad5479c6064143ce5afa958af83.diff
LOG: [mlir][MemRef] Fix warning on unsigned comparison
Fix warning in clang introduced in D121766.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D122333
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 d0ab38c1be849..67f166da5ec1a 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -761,7 +761,8 @@ computeMemRefRankReductionMask(MemRefType originalType, MemRefType reducedType,
// Early exit for the case where the number of unused dims matches the number
// of ranks reduced.
- if (unusedDims.count() + reducedType.getRank() == originalType.getRank())
+ if (static_cast<int64_t>(unusedDims.count()) + reducedType.getRank() ==
+ originalType.getRank())
return unusedDims;
SmallVector<int64_t> originalStrides, candidateStrides;
More information about the Mlir-commits
mailing list