This re-raises some of the open questions about how to apply and use fast-math-flags in IR from PR38086:
https://bugs.llvm.org/show_bug.cgi?id=38086
...but given the current implementation, I think this is the correct way to predicate the transform.
This is part of solving PR39475:
https://bugs.llvm.org/show_bug.cgi?id=39475
Sure NaNs are compared as unordered so excluding them is ok. Discussion point: If X has value below -0.0, CannotBeOrderedLessThanZero will return false if it can prove it, however so will the comparison of X > 0 as an ordered compare. Now we no longer have to prove X is a NaN in CannotBeOrderedLessThanZero as we specify/assert it is not. Do we need CannotBeOrderedLessThanZero for this comparison?