Manually move constants to the right in the folder.
Kiran brought up in https://reviews.llvm.org/D117010 that fmin/fmax might not be commutative when NaNs are involved. That depends on which NaNs are considered 'same' (could be: IEEE, memcmp, all NaN are equal irrespective of the payload). Only the last one makes fmin/fmax commutative.
This change removes the Commutative op interface from fmin/fmax again to avoid the ambiguity, while still moving constants to the right hand side.
These swaps are only valid when the constant isn't a NaN I think, otherwise you replicate the same issue you mentioned potentially?