r245534 - in /trunk/gcc: ChangeLog config/rs600...
segher@gcc.gnu.org
segher@gcc.gnu.org
Fri Feb 17 15:00:00 GMT 2017
Author: segher
Date: Fri Feb 17 15:00:37 2017
New Revision: 245534
URL: https://gcc.gnu.org/viewcvs?rev=245534&root=gcc&view=rev
Log:
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.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.md
More information about the Gcc-cvs
mailing list