[RFC] Fix floating-point `max` and `min` operations in MLIR

I also came across this issue, and I support this proposal. With respect to the current status quo of arith, I am fully in favor of alignment with LLVM.

In light of arith vs llvm, I’d like to complicate this issue a little bit further though. For reference, I studied IEEE-754 on the matter, but got a sombering result: partly because implementations disagree wildly on the treatment of NaN, the standard has dropped minNum and maxNum. In other words, there’s little else to align them to.

Under the assumption that we might want arith to be a more high-level arithmetic dialect in future, this means operations like min and max are going to need our own spec. Additionally, I’d consider the existence of two different operations like in your proposal a downside for a high-level dialect.