A question about this behavior came up on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-February/139003.html
...and as part of backend improvements in D73978, but let's see if we can reach agreement on the transforms in IR first because we already have fairly thorough tests in place here.
If one constant operand to {fadd/fsub/fmul/fdiv/frem} is not {NaN/Inf/0.0/-0.0} and the other constant operand is undef, then we can choose 'undef' as some other value that changes all of the fields (sign, exponent, fraction) in the result FP value. Is that enough to say the result is undef?