[Mlir-commits] [mlir] [mlir][math] Expand powfI operation for constant power operand. (PR #87081)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Mar 30 06:26:20 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 89bae852dddeb2b66a1843dbe5eea21184e54814 3b6559dc730a6738db78c8063f8b8553ceb0e002 -- mlir/include/mlir/Dialect/Math/Transforms/Passes.h mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp mlir/test/lib/Dialect/Math/TestExpandMath.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp b/mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
index ed42dd59b4..1d79ac1422 100644
--- a/mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
+++ b/mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
@@ -206,14 +206,13 @@ static LogicalResult convertCeilOp(math::CeilOp op, PatternRewriter &rewriter) {
// Convert `math.fpowi` to a series of `arith.mulf` operations.
// If the power is negative, we divide one by the result.
static LogicalResult convertFPowICstOp(math::FPowIOp op,
- PatternRewriter &rewriter) {
+ PatternRewriter &rewriter) {
ImplicitLocOpBuilder b(op->getLoc(), rewriter);
Value base = op.getOperand(0);
Value power = op.getOperand(1);
Type baseType = base.getType();
Value tempBase = op.getOperand(0);
-
Attribute cstAttr;
if (!matchPattern(power, m_Constant(&cstAttr)))
return failure();
``````````
</details>
https://github.com/llvm/llvm-project/pull/87081
More information about the Mlir-commits
mailing list