[Bug target/47989] -mrecip causes 482.sphinx3, 464.h264ref and 481.wrf to miscompare

2011-10-20 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47989

Uros Bizjak  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2011-10/msg01825.htm
   ||l
 Resolution||FIXED
   Target Milestone|--- |4.7.0

--- Comment #5 from Uros Bizjak  2011-10-20 15:29:51 
UTC ---
We now use reciprocals for vectorized operators by default, see threads at [1],
[2] and [3] for the discussion.

[1] http://gcc.gnu.org/ml/gcc-patches/2011-08/msg02550.html
[2] http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00212.html
[3] http://gcc.gnu.org/ml/gcc-patches/2011-10/msg01825.html

So, fixed.


[Bug target/47989] -mrecip causes 482.sphinx3, 464.h264ref and 481.wrf to miscompare

2011-10-20 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47989

--- Comment #4 from uros at gcc dot gnu.org 2011-10-20 15:13:39 UTC ---
Author: uros
Date: Thu Oct 20 15:13:30 2011
New Revision: 180256

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180256
Log:
PR target/47989
* config/i386/i386.h (RECIP_MASK_DEFAULT): New define.
* config/i386/i386.op (recip_mask): Initialize with RECIP_MASK_DEFAULT.
* doc/invoke.texi (ix86 Options, -mrecip): Document that GCC
implements vectorized single float division and vectorized sqrtf(x)
with reciprocal sequence with additional Newton-Raphson step with
-ffast-math.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.h
trunk/gcc/config/i386/i386.opt
trunk/gcc/doc/invoke.texi


[Bug target/47989] -mrecip causes 482.sphinx3, 464.h264ref and 481.wrf to miscompare

2011-03-10 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47989

--- Comment #3 from Dominique d'Humieres  2011-03-10 
14:01:25 UTC ---
A similar problem occurs with the polyhedron test aermod.f90 (see pr34702).

> Feeding rcps sequences into call stmts is probably never a very good idea.

Probably the same thing for tests.

> In all cases the Intel compiler simply only uses rcp instructions for
> vectorized loops.

I think this would be a good idea, however the last time I have looked at it
(some time ago!-), gcc was not as good as intel to vectorize rcp.


[Bug target/47989] -mrecip causes 482.sphinx3, 464.h264ref and 481.wrf to miscompare

2011-03-10 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47989

Richard Guenther  changed:

   What|Removed |Added

Summary|-mrecip causes 482.sphinx3  |-mrecip causes 482.sphinx3,
   |and 464.h264ref to  |464.h264ref and 481.wrf to
   |miscompare  |miscompare

--- Comment #2 from Richard Guenther  2011-03-10 
13:27:22 UTC ---
Same for 481.wrf, hope for dealing with this with taking into account context
of the division vanishes here.  The code is obfuscated with several
levels of array lookup.

In all cases the Intel compiler simply only uses rcp instructions for
vectorized loops.