This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Excess precision problem on IA-64


> 
> --Boundary-00=_dFRYDl9RKCduOdb
> Content-Type: text/plain;
>   charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> Hi,
> 
> We have run into an excess precision problem on IA-64, similar to the infamous 
> problem on IA-32.  A C testcase is attached.
> 
> botcazou@taff:~/EA26-004> gcc -v
> Using built-in specs.
> Target: ia64-sgi-linux-gnu
> Configured with: /home01/botcazou/cvs/gcc/configure ia64-sgi-linux-gnu 
> --prefix=/nile.build/botcazou/fsf/install_ia64 --disable-nls 
> --disable-libmudflap --disable-checking --enable-languages=c,c++
> Thread model: posix
> gcc version 4.1.0 20051024 (experimental)
> botcazou@taff:~/EA26-004> gcc -o t t.c
> botcazou@taff:~/EA26-004> ./t
> botcazou@taff:~/EA26-004> gcc -o t t.c -O
> botcazou@taff:~/EA26-004> ./t
> Aborted
> 
> The bottom line is that:
> 
>   fmpy.s f8 = f8, f15
>   fma.s f8 = f11, f12, f8
> 
> doesn't always give 0.0 in f8 when f8 = f15 = f11 = -f12, because the
> computations are done in "infinite precision" and only rounded at the end.
> 
> 
> What should we do about that?  Conditionalize the combined FP operations on 
> -ffast-math or something along these lines?

This seems like any other target which has a fused multiply and add  instruction
like PPC.  Maybe a target option to turn on and off the fma instruction like
there is for PPC.

-- Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]