[Mlir-commits] [mlir] [mlir][memref] Fix type conversion in emulate-wide-int and emulate-narrow-type (PR #112214)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Oct 14 07:58:12 PDT 2024


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 11f625cb877cd86282d37ef4c92b848d415d336f 1f5ebbd17d3bd2ec3d9ab9b89f70468cac831a39 --extensions cpp -- mlir/lib/Dialect/Arith/Transforms/EmulateNarrowType.cpp mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp mlir/lib/Dialect/MemRef/Transforms/EmulateWideInt.cpp
``````````

</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 3b5369c370..156522389e 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
+++ b/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
@@ -169,7 +169,8 @@ struct ConvertMemRefAllocation final : OpConversionPattern<OpTy> {
                       std::is_same<OpTy, memref::AllocaOp>(),
                   "expected only memref::AllocOp or memref::AllocaOp");
     auto currentType = cast<MemRefType>(op.getMemref().getType());
-    auto newResultType = this->getTypeConverter()->convertType<MemRefType>(op.getType());
+    auto newResultType =
+        this->getTypeConverter()->convertType<MemRefType>(op.getType());
     if (!newResultType) {
       return rewriter.notifyMatchFailure(
           op->getLoc(),
@@ -376,7 +377,8 @@ struct ConvertMemRefReinterpretCast final
   LogicalResult
   matchAndRewrite(memref::ReinterpretCastOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    MemRefType newTy = getTypeConverter()->convertType<MemRefType>(op.getType());
+    MemRefType newTy =
+        getTypeConverter()->convertType<MemRefType>(op.getType());
     if (!newTy) {
       return rewriter.notifyMatchFailure(
           op->getLoc(),
@@ -464,7 +466,8 @@ struct ConvertMemRefSubview final : OpConversionPattern<memref::SubViewOp> {
   LogicalResult
   matchAndRewrite(memref::SubViewOp subViewOp, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    MemRefType newTy = getTypeConverter()->convertType<MemRefType>(subViewOp.getType());
+    MemRefType newTy =
+        getTypeConverter()->convertType<MemRefType>(subViewOp.getType());
     if (!newTy) {
       return rewriter.notifyMatchFailure(
           subViewOp->getLoc(),

``````````

</details>


https://github.com/llvm/llvm-project/pull/112214


More information about the Mlir-commits mailing list