[ConstantFold] fold fsub -0.0, undef to undef rather than NaN

Authored by spatel on Feb 21 2020, 4:58 AM.


[ConstantFold] fold fsub -0.0, undef to undef rather than NaN

A question about this behavior came up on llvm-dev:
...and as part of backend improvements in D73978, but this is an IR
change first because we already have fairly thorough tests in place

We decided not to implement a more general change that would have
folded any FP binop with nearly arbitrary constant + undef operand
to undef because that is not theoretically correct (even if it is
practically correct).

Differential Revision: https://reviews.llvm.org/D74713