[Mlir-commits] [mlir] [mlir][complex] Support Fastmath flag in conversion of complex.div to standard (PR #82729)
Mehdi Amini
llvmlistbot at llvm.org
Fri Feb 23 18:05:42 PST 2024
================
@@ -206,11 +207,13 @@ struct TrigonometricOpConversion : public OpConversionPattern<TrigonometricOp> {
// implementation in the subclass to combine them.
Value half = rewriter.create<arith::ConstantOp>(
loc, elementType, rewriter.getFloatAttr(elementType, 0.5));
- Value exp = rewriter.create<math::ExpOp>(loc, imag);
- Value scaledExp = rewriter.create<arith::MulFOp>(loc, half, exp);
- Value reciprocalExp = rewriter.create<arith::DivFOp>(loc, half, exp);
- Value sin = rewriter.create<math::SinOp>(loc, real);
- Value cos = rewriter.create<math::CosOp>(loc, real);
+ Value exp = rewriter.create<math::ExpOp>(loc, imag, fmf.getValue());
+ Value scaledExp =
+ rewriter.create<arith::MulFOp>(loc, half, exp, fmf.getValue());
+ Value reciprocalExp =
+ rewriter.create<arith::DivFOp>(loc, half, exp, fmf.getValue());
+ Value sin = rewriter.create<math::SinOp>(loc, real, fmf.getValue());
+ Value cos = rewriter.create<math::CosOp>(loc, real, fmf.getValue());
----------------
joker-eph wrote:
Yes, we should remove `getValue()` everywhere
https://github.com/llvm/llvm-project/pull/82729
More information about the Mlir-commits
mailing list