This is a preliminary step towards solving the remaining part of PR27145 - IR for isfinite():
https://bugs.llvm.org/show_bug.cgi?id=27145
In order to solve that one more generally, we need to add matching for and/or of fcmp ord/uno with a constant operand.
But while looking at those patterns, I realized we were missing a canonicalization for nonzero constants. By transforming everything to 0.0, we can simplify the existing code in foldLogicOfFCmps() and pick up missing vector folds.
This handling of undef makes sense where you're using it, but is a bit weird for a function named "isKnownNeverNaN".
Would it make sense for this to be a utility that operates on arbitrary values, rather than constants? For example, we can assume the result of an sitofp is never a NaN.