> 
> --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.
> 
> [EMAIL PROTECTED]:~/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)
> [EMAIL PROTECTED]:~/EA26-004> gcc -o t t.c
> [EMAIL PROTECTED]:~/EA26-004> ./t
> [EMAIL PROTECTED]:~/EA26-004> gcc -o t t.c -O
> [EMAIL PROTECTED]:~/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

Reply via email to