The SDAG version uses fminnum/fmaxnum, in converting it to fcmp+select
it appears the order of the operands was chosen badly. This switches the
conditions used to keep the constant on the RHS.
(cherry picked from commit 70ed381b1693697dec3efcaed161d3626d16cff1)