[mlir] Fix warnings

This patch fixes:

  mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp:137:8:
  error: unused variable 'vectorType' [-Werror,-Wunused-variable]

  mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp:154:8:
  error: unused variable 'srcType' [-Werror,-Wunused-variable]

  mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp:155:8:
  error: unused variable 'destType' [-Werror,-Wunused-variable]
This commit is contained in:
Kazu Hirata
2024-11-05 09:53:44 -08:00
parent c8221359f0
commit dbb4858a8c

View File

@@ -137,6 +137,7 @@ static Value staticallyExtractSubvector(OpBuilder &rewriter, Location loc,
auto vectorType = cast<VectorType>(source.getType());
assert((vectorType.getRank() == 1 && extractType.getRank() == 1) &&
"expected 1-D source and destination types");
(void)vectorType;
auto offsets = rewriter.getI64ArrayAttr({frontOffset});
auto sizes = rewriter.getI64ArrayAttr({subvecSize});
auto strides = rewriter.getI64ArrayAttr({1});
@@ -155,6 +156,8 @@ static Value staticallyInsertSubvector(OpBuilder &rewriter, Location loc,
auto destType = cast<VectorType>(dest.getType());
assert(srcType.getRank() == 1 && destType.getRank() == 1 &&
"expected source and dest to be vector type");
(void)srcType;
(void)destType;
auto offsets = rewriter.getI64ArrayAttr({offset});
auto strides = rewriter.getI64ArrayAttr({1});
return rewriter.create<vector::InsertStridedSliceOp>(loc, dest.getType(), src,