[mlir][arith] Improve Lowering of `maxf`/`minf` ops (#65213)
This patch is part of a larger initiative aimed at fixing floating-point `max` and `min` operations in MLIR: https://discourse.llvm.org/t/rfc-fix-floating-point-max-and-min-operations-in-mlir/72671. This patch addresses task 1.1 from the plan. It involves modifying the lowering process for `arith.minf` and `arith.maxf` operations. Specifically, the change replaces the usage of `llvm.minnum` and `llvm.maxnum` with `llvm.minimum` and `llvm.maximum`, respectively. This adjustment is necessary because the `m**num` intrinsics are not suitable for the mentioned MLIR operations due to semantic discrepancies in handling NaNs, positive and negative floating-point zeros.
Loading
Please sign in to comment