[Mlir-commits] [mlir] [mlir][math] Expand powfI operation for constant power operand. (PR #87081)

Han-Chung Wang llvmlistbot at llvm.org
Fri Mar 29 09:53:28 PDT 2024


================
@@ -202,6 +202,44 @@ static LogicalResult convertCeilOp(math::CeilOp op, PatternRewriter &rewriter) {
   rewriter.replaceOp(op, ret);
   return success();
 }
+
+// Convert `math.fpowi` to a series of `arith.mulf` operations.
+// If the power is negative, we divide one by the result.
+static LogicalResult convertFPowIOp(math::FPowIOp op,
----------------
hanhanW wrote:

We will need a version for non-constant. How about renaming this to `convertFPowICstOp`?

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


More information about the Mlir-commits mailing list