On Fri, 18 Nov 2016, Chris Metcalf wrote:
On 11/18/2016 1:11 PM, Joseph Myers wrote:
On Fri, 18 Nov 2016, Chris Metcalf wrote:
We clearly should also tell libgcc not to bother preserving nan
payloads given that the hardware doesn't do it in any case; I'll pass
that along to the compiler team, but I'll also commit my original
patch since it seems to match the hardware behavior.
FWIW, I wouldn't expect any significant performance difference between
copying a payload and setting a payload to the canonical one (which is
what you get if !_FP_KEEPNANFRACP).
My assumption was that we should tweak it for consistency, not for
performance. Is your sense that we might as well keep the NaN
payloads in libgcc even if we don't with inline float operations?
Consistency with hardware is logical (I think the reason for such hooks in
soft-fp is to allows its use in Linux kernel floating-point emulation to
behave the same as the hardware being emulated). Note however that when
soft-fp creates a default NaN it also gives it a default sign - if that's
what you want for consistency with hardware, you'll need a new
math-tests.h hook for these canonicalize tests to disregard the sign of
the result as well as its payload.