[Mlir-commits] [mlir] [MLIR][MemRef] Extend narrow-type emulation for dynamic offsets (PR #196945)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon May 11 06:24:06 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp b/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
index 71aa34512..31b1be3de 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
+++ b/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
@@ -56,8 +56,8 @@ convertCastingOp(ConversionPatternRewriter &rewriter,
ArrayRef<int64_t> staticStrides = op.getStaticStrides();
if (!staticStrides.empty() && staticStrides.back() != 1) {
- return rewriter.notifyMatchFailure(op->getLoc(),
- "innermost stride != 1 is not supported");
+ return rewriter.notifyMatchFailure(
+ op->getLoc(), "innermost stride != 1 is not supported");
}
if (llvm::is_contained(op.getStaticSizes(), ShapedType::kDynamic)) {
@@ -683,14 +683,14 @@ void memref::populateMemRefNarrowTypeEmulationPatterns(
RewritePatternSet &patterns, bool disableAtomicRMW) {
// Populate `memref.*` conversion patterns.
- patterns.add<ConvertMemRefAllocation<memref::AllocOp>,
- ConvertMemRefAllocation<memref::AllocaOp>, ConvertMemRefCast,
- ConvertMemRefCopy, ConvertMemRefDealloc,
- ConvertMemRefCollapseShape, ConvertMemRefExpandShape,
- ConvertMemRefLoad, ConvertMemRefAssumeAlignment,
- ConvertMemRefMemorySpaceCast, ConvertMemRefSubview,
- ConvertMemRefReinterpretCast>(typeConverter,
- patterns.getContext());
+ patterns
+ .add<ConvertMemRefAllocation<memref::AllocOp>,
+ ConvertMemRefAllocation<memref::AllocaOp>, ConvertMemRefCast,
+ ConvertMemRefCopy, ConvertMemRefDealloc, ConvertMemRefCollapseShape,
+ ConvertMemRefExpandShape, ConvertMemRefLoad,
+ ConvertMemRefAssumeAlignment, ConvertMemRefMemorySpaceCast,
+ ConvertMemRefSubview, ConvertMemRefReinterpretCast>(
+ typeConverter, patterns.getContext());
patterns.insert<ConvertMemrefStore>(typeConverter, patterns.getContext(),
disableAtomicRMW);
memref::populateResolveExtractStridedMetadataPatterns(patterns);
``````````
</details>
https://github.com/llvm/llvm-project/pull/196945
More information about the Mlir-commits
mailing list