This is 1 step towards correcting our usage of fast-math-flags when applied on an fcmp. In this case, we were checking for 'nnan' on the fcmp itself rather than the operand of the fcmp.
By using the more general "isKnownNeverNaN()", we gain a simplification shown on the tests with 'uitofp' regardless of the FMF on the fcmp (uitofp never produces a NaN). On the tests with 'fabs', we are now relying on the FMF for the call fabs instruction rather than the FMF on the fcmp.
If this looks ok, I'll update the 'ult' case below here as a follow-up.