[RFC] Explicitly specifying NaN and signed zero semantics for minf and maxf

@antiagainst pointed me to an earlier discussion on this: Adding min/max (int/float) ops to standard dialect - #4 by awpr

I think we have to be extra clear and careful when deciding what ‘consistent semantics’ mean for Unknown/Undefined. Based on:

I understood that:

  1. It’s either PropagateNaN or PropagateOther globally in the whole module.
  2. minf/maxf are Pure (speculatable, no implicit memory effects)
  3. Duplication, CSE, DCE are all fine. This should not fail:
  1. We can only constant-fold when we know arguments to be non-NaN.

Without either a strict notion of consistency or disallowing NaN arguments, I don’t see how we would be able to do basic transformations like scalarization, vectorization, loop unrolling, etc.