[Mlir-commits] [mlir] [mlir][amdgpu] Add conversion from arith.scaling_extf to amdgpu (PR #146372)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jul 8 06:14:15 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp b/mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp
index 0601fd426..cf9bb3a00 100644
--- a/mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp
+++ b/mlir/lib/Conversion/ArithToAMDGPU/ArithToAMDGPU.cpp
@@ -641,7 +641,8 @@ ScalingTruncFRewritePattern::matchAndRewrite(arith::ScalingTruncFOp op,
       Value scaleTrunc = rewriter.create<amdgpu::PackedScaledTruncOp>(
           loc, truncScaleResultType, slice, uniformScale, 0,
           /*existing=*/nullptr);
-      int64_t packedWidth = cast<VectorType>(scaleTrunc.getType()).getNumElements();
+      int64_t packedWidth =
+          cast<VectorType>(scaleTrunc.getType()).getNumElements();
       if (packedWidth != opWidth)
         scaleTrunc = rewriter.create<vector::ExtractStridedSliceOp>(
             loc, scaleTrunc, 0, sliceWidth, 1);

``````````

</details>


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


More information about the Mlir-commits mailing list