rs6000: Fix extendsfdf2 for signaling NaNs
A cast from float to double should turn a signaling NaN into a quiet
NaN, if using -fsignaling-nans. On PowerPC single-precision floats are
stored as double precision in registers, and so, the cast normally does
nothing. This causes gcc.dg/pr59833.c to fail (it does such a cast,
and expects a quiet NaN as output).
This patch adds a new pattern, used with -fsignaling-nans in effect,
that creates an frsp instruction (or xsrsp) in this case. Since the
input already is SFmode, that instruction turns signaling NaNs into
quiet NaNs and does nothing more.
* config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
If HONOR_SNANS (SFmode) force the input to a register.
(*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
(*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
an frsp or similar insn.
From-SVN: r245534