[Mlir-commits] [mlir] [mlir][math] Add FP software implementation lowering pass: math-to-apfloat (PR #171221)
Maksim Levental
llvmlistbot at llvm.org
Fri Dec 12 14:49:53 PST 2025
================
@@ -32,11 +32,15 @@ namespace {
template <typename SourceOp, typename TargetOp>
using ConvertFastMath = arith::AttrConvertFastMathToLLVM<SourceOp, TargetOp>;
-template <typename SourceOp, typename TargetOp>
+template <typename SourceOp, typename TargetOp,
+ bool FailOnUnsupportedFP = false>
using ConvertFMFMathToLLVMPattern =
- VectorConvertToLLVMPattern<SourceOp, TargetOp, ConvertFastMath>;
+ VectorConvertToLLVMPattern<SourceOp, TargetOp, ConvertFastMath,
+ FailOnUnsupportedFP>;
-using AbsFOpLowering = ConvertFMFMathToLLVMPattern<math::AbsFOp, LLVM::FAbsOp>;
+using AbsFOpLowering =
+ ConvertFMFMathToLLVMPattern<math::AbsFOp, LLVM::FAbsOp,
+ /*FailOnUnsupportedFP=*/true>;
using CeilOpLowering = ConvertFMFMathToLLVMPattern<math::CeilOp, LLVM::FCeilOp>;
----------------
makslevental wrote:
resolved in the other PR (leave as is and explicitly mark as `FailOnUnsupportedFP=true`
https://github.com/llvm/llvm-project/pull/171221
More information about the Mlir-commits
mailing list