[flang-commits] [flang] [mlir] [RFC][mlir] Conditional support for fast-math attributes. (PR #125620)
Jakub Kuderski via flang-commits
flang-commits at lists.llvm.org
Tue Feb 4 13:03:25 PST 2025
kuhar wrote:
I think we could do something like this:
* add a new op, say `arith.assumef %x fastmath<nnan> : f32` whose sole purpose is to apply fast math flags its operand
* teach arith to llvm conversion to convert `arith.select(arith.assumef(x), arith.assumef(y))` to apply fast math flags to the produced `llvm.select` (and potentially other ops)
* teach the frontend to produce these `arith.assumef` ops when emitting selects with fast math enabled
https://github.com/llvm/llvm-project/pull/125620
More information about the flang-commits
mailing list