[Mlir-commits] [mlir] dbb4858 - [mlir] Fix warnings
Kazu Hirata
llvmlistbot at llvm.org
Tue Nov 5 09:53:52 PST 2024
Author: Kazu Hirata
Date: 2024-11-05T09:53:44-08:00
New Revision: dbb4858a8c0cd883ff4e4d5df20152c4b295b909
URL: https://github.com/llvm/llvm-project/commit/dbb4858a8c0cd883ff4e4d5df20152c4b295b909
DIFF: https://github.com/llvm/llvm-project/commit/dbb4858a8c0cd883ff4e4d5df20152c4b295b909.diff
LOG: [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]
Added:
Modified:
mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
index 8f72e816ea42d1..58841f29698e0d 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
@@ -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,
More information about the Mlir-commits
mailing list