diff --git a/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp b/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp @@ -361,7 +361,7 @@ return false; }; - int64_t dim = 0; + unsigned dim = 0; while (dim < operandShape.size() && isUnitDim(dim)) reassociationGroup.push_back(dim++); while (dim < operandShape.size()) { @@ -409,7 +409,6 @@ llvm::SmallDenseSet unitDimsFilter(allowedUnitDims.begin(), allowedUnitDims.end()); llvm::SmallDenseSet unitDims; - ArrayAttr iteratorTypes = genericOp.getIteratorTypes(); for (const auto &expr : enumerate(invertedMap.getResults())) { if (AffineDimExpr dimExpr = expr.value().dyn_cast()) { if (dims[dimExpr.getPosition()] == 1 && diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp --- a/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp +++ b/mlir/test/lib/Dialect/Linalg/TestLinalgDropUnitDims.cpp @@ -58,7 +58,7 @@ for (auto genericOp : genericOps) { rewriter.setInsertionPoint(genericOp); - dropOutermostUnitDims(rewriter, genericOp); + (void)dropOutermostUnitDims(rewriter, genericOp); } } };