This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix 61441 [5/5] Disable various transformations for signaling NaN operands
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Saraswati, Sujoy (OSTL)" <sujoy dot saraswati at hpe dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Sujoy Saraswati <ssaraswati at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>
- Date: Thu, 7 Jan 2016 09:32:14 +0100
- Subject: Re: Fix 61441 [5/5] Disable various transformations for signaling NaN operands
- Authentication-results: sourceware.org; auth=none
- References: <5379BA8D7E9D7E4D87BF6749A92854C248FC90F6 at G4W3297 dot americas dot hpqcorp dot net> <20151231093556 dot GZ18720 at tucnak dot redhat dot com> <5379BA8D7E9D7E4D87BF6749A92854C248FEBF74 at G9W0750 dot americas dot hpqcorp dot net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jan 07, 2016 at 06:48:25AM +0000, Saraswati, Sujoy (OSTL) wrote:
> Hi,
>
> > On Thu, Nov 26, 2015 at 08:38:55AM +0000, Saraswati, Sujoy (OSTL) wrote:
> > > PR tree-optimization/61441
> > > * gcc.dg/pr61441.c: New testcase.
> >
> > Note the testcase fails on i686-linux, and even -fexcess-precision=standard
> > doesn't help (-ffloat-store works, but that is a big hammer and we really
> > don't want it for targets without excess precision).
> > At least with -fexcess-precision=standard, the problem is in the fabs case,
> > with -fexcess-precision=standard the value is then rounded from long
> > double to double and that rounding affects the signalling bit.
> > So, either the testcase should be compiled with -fexcess-precision=standard
> > and the operation(Abs) case be guarded with #if __FLT_EVAL_METHOD__
> > == 0, or something similar.
>
> I modified the test case as below -
If you have access to x86_64-linux, you can easily test it yourself with:
make -C gcc check-gcc RUNTESTFLAGS='--target_board=unix\{-m64,-m32/-march=i386\} dg.exp=pr61441.c'
Your patch does help.
issignalling is a GNU extension of glibc, so supposedly you should limit the
test to the targets that use glibc, so either
/* { dg-do run { target { *-*-linux* *-*-gnu* } } } */
or perhaps specific target-supports.exp test for this (I wonder if android
and/or uclibc support it).
> I did a search on the https://gcc.gnu.org/ml/gcc-testresults/2015-12/ but couldn't see a failure report for this - is there place where I could look up to see the test results for various architectures ?
Perhaps H.J. uses differently configured i686-linux build? If it is
configured with --with-fpmath=sse or =avx, then i387 is only used
for long double and therefore the target is not excess precision target any longer.
Jakub