After applying FMIN/FMAX, if any of operands is NaN, the second operand will be the result.
So all we need is to check whether first operand is NaN and return it or result of FMIN/FMAX.
So we avoid usage of constant NaN in the lowering.
Additionally we can avoid handling NaN after FMIN/FMAX if we are sure that first operand is not NaN.
Reviewed By: e-kud
Differential Revision: https://reviews.llvm.org/D149729