[Mlir-commits] [mlir] b2e2ae8 - [mlir] Fix warnings
Kazu Hirata
llvmlistbot at llvm.org
Thu May 1 12:41:36 PDT 2025
Author: Kazu Hirata
Date: 2025-05-01T12:41:31-07:00
New Revision: b2e2ae8702e9fbbe0ef0eb5929aa2d5dc867b1c5
URL: https://github.com/llvm/llvm-project/commit/b2e2ae8702e9fbbe0ef0eb5929aa2d5dc867b1c5
DIFF: https://github.com/llvm/llvm-project/commit/b2e2ae8702e9fbbe0ef0eb5929aa2d5dc867b1c5.diff
LOG: [mlir] Fix warnings
This patch fixes:
mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp:901:12:
error: variable 'origVecType' set but not used
[-Werror,-Wunused-but-set-variable]
mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp:908:12:
error: variable 'origTensorDescTy' set but not used
[-Werror,-Wunused-but-set-variable]
Added:
Modified:
mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp b/mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
index 019032f7743bf..deb3a35529ad0 100644
--- a/mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
+++ b/mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
@@ -898,14 +898,14 @@ static Value resolveDistributedTy(Value orig, T expected,
if (orig.getType() == expected)
return orig;
// If orig is a vector type, create a shape cast op to reconcile the types.
- if (auto origVecType = isa<VectorType>(orig.getType())) {
+ if (isa<VectorType>(orig.getType())) {
auto castOp =
rewriter.create<vector::ShapeCastOp>(orig.getLoc(), expected, orig);
return castOp.getResult();
}
// If orig is a tensor descriptor type, create an unrealized conversion cast
// op to reconcile the types.
- if (auto origTensorDescTy = isa<xegpu::TensorDescType>(orig.getType())) {
+ if (isa<xegpu::TensorDescType>(orig.getType())) {
auto castOp = rewriter.create<UnrealizedConversionCastOp>(orig.getLoc(),
expected, orig);
return castOp.getResult(0);
More information about the Mlir-commits
mailing list