[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: icc bug on test-frexp-nolibm
From: |
Eric Blake |
Subject: |
Re: icc bug on test-frexp-nolibm |
Date: |
Fri, 05 Nov 2010 14:08:13 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc14 Mnenhy/0.8.3 Thunderbird/3.1.6 |
On 11/05/2010 01:57 PM, Eric Blake wrote:
> That is, with no options, icc defaults to -O2. With -g it implies -O0
> which in turn implies -mieee-fp. It is also possible to use -mieee-fp
> in isolation, or alongside an explicit -O2. The "bug", then, is that
> when optimization is enabled and -mieee-fp is not in effect, the
> compiler changes behavior of casting float to double such that denormal
> floats become 0.0 rather than the proper full-precision double
> representation. And, since the ABI passes all floats to function calls
> by converting to double, we've already lost - the denormal float has
> already been converted to zero prior to the gnulib function receiving an
> argument.
Correction - that is only in the case of passing a float to a varargs
function like printf; regular functions do have a difference of passing
only the 4-byte float instead of the 8-byte double, but with printf
behaving differently, it was harder to see when the float->double
conversion was truncating denormal floats.
>
> I'm debating whether the fix is to extend the fpieee module to recognize
> the ICC compiler, and make any <math.h> float-related tests depend on
> fpieee, or to relax the testsuite to somehow expose when a compiler is
> not performing IEEE-compliant conversion of float denormals to double
> and skipping that part of the test.
I'm still trying to figure out a reliable method for doing runtime
testing with ICC code to sniff out whether float denormals might be
chopped by the current compiler options.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- icc bug on test-frexp-nolibm, Eric Blake, 2010/11/03
- Re: icc bug on test-frexp-nolibm, Eric Blake, 2010/11/04
- [PATCH 2/2] ceil, floor, round, trunc: enhance tests of -0, Eric Blake, 2010/11/04
- [PATCH 1/2] frexp, tests: work around ICC bug with -zero, Eric Blake, 2010/11/04
- Re: icc bug on test-frexp-nolibm, Eric Blake, 2010/11/05
- Re: icc bug on test-frexp-nolibm, Eric Blake, 2010/11/05