[ConstantFold] Fix misfolding fcmp of a ConstantExpr NaN with itself.

The code incorrectly inferred that the relationship of a constant expression
to itself is FCMP_OEQ (ordered and equal), when it's actually FCMP_UEQ
(unordered *or* equal). This change corrects that, and adds some more limited
folds that can be done in this case.

Differential revision: https://reviews.llvm.org/D51216



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354381 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed