[Mlir-commits] [mlir] [mlir][arith] Add `arith.fptofp` op (PR #188041)

Matthias Springer llvmlistbot at llvm.org
Mon Mar 23 08:19:59 PDT 2026


matthias-springer wrote:

> Like when making a rewriter pattern you would catch the entire FpToFp op and do multiple if and validation checks to match it.

Yes, when lowering to LLVM, you have to check if it's going to turn into an `fext` or `ftrunc`. But it's a simple check.

On the other hand, you may be able to get rid of these checks when coming from the frontend. E.g., PyTorch does not distinguish between FP extensions/truncations: `x_f32.to(torch.float16)`.


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


More information about the Mlir-commits mailing list