[Mlir-commits] [mlir] 67391fc - [mlir] Construct SmallVector with initial values (NFC) (#169239)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Nov 23 22:32:54 PST 2025
Author: Kazu Hirata
Date: 2025-11-23T22:32:50-08:00
New Revision: 67391fc039b27f4e82624a6de4493cdd0907878b
URL: https://github.com/llvm/llvm-project/commit/67391fc039b27f4e82624a6de4493cdd0907878b
DIFF: https://github.com/llvm/llvm-project/commit/67391fc039b27f4e82624a6de4493cdd0907878b.diff
LOG: [mlir] Construct SmallVector with initial values (NFC) (#169239)
Identified with llvm-use-ranges.
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 4455811a2e681..b64eb5b29ccb0 100644
--- a/mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
+++ b/mlir/lib/Dialect/XeGPU/Transforms/XeGPUSubgroupDistribute.cpp
@@ -989,9 +989,8 @@ struct LoadMatrixDistribution final : public gpu::WarpDistributionPattern {
SmallVector<Value> newOperands = llvm::map_to_vector(
newRetIndices, [&](size_t idx) { return newWarpOp.getResult(idx); });
- SmallVector<int64_t> newConstOffsets{matrixOp.getConstOffsets()};
- std::fill(newConstOffsets.begin(), newConstOffsets.end(),
- ShapedType::kDynamic);
+ SmallVector<int64_t> newConstOffsets(matrixOp.getConstOffsets().size(),
+ ShapedType::kDynamic);
DenseI64ArrayAttr newConstOffsetsAttr =
rewriter.getDenseI64ArrayAttr(newConstOffsets);
ValueRange currentOffsets =
@@ -1066,9 +1065,8 @@ struct StoreMatrixDistribution final : public gpu::WarpDistributionPattern {
SmallVector<Value> newOperands = llvm::map_to_vector(
newRetIndices, [&](size_t idx) { return newWarpOp.getResult(idx); });
- SmallVector<int64_t> newConstOffsets{matrixOp.getConstOffsets()};
- std::fill(newConstOffsets.begin(), newConstOffsets.end(),
- ShapedType::kDynamic);
+ SmallVector<int64_t> newConstOffsets(matrixOp.getConstOffsets().size(),
+ ShapedType::kDynamic);
DenseI64ArrayAttr newConstOffsetsAttr =
rewriter.getDenseI64ArrayAttr(newConstOffsets);
ValueRange currentOffsets =
More information about the Mlir-commits
mailing list