--- Comment #18 from vincent at vinc17 dot org 2010-03-18 14:37 ---
The patch affected C, where the transformation of pow(x, 0.5) into sqrt(x) is
incorrect. See PR 43419.
--
vincent at vinc17 dot org changed:
What|Removed |Added
---
--- Comment #17 from fxcoudert at gcc dot gnu dot org 2007-01-22 22:02
---
cbrt is now available in the front-end (among others), thanks again to Richard!
Closing this PR, as the optimization appears to be working fully:
$ cat a.f90
REAL*8 :: a(6),b(6)
read(*,*) a(:)
b(1)=a(1)**(1.D0/
--- Comment #16 from jv244 at cam dot ac dot uk 2006-11-27 16:49 ---
(In reply to comment #15)
> Fixed (partly) on the mainline. We can now expand pow (x, n/2) and pow (x,
> n/3)
> properly using sqrt and/or cbrt, but cbrt is not available from the fortran
> frontend (it misses to defin
--- Comment #15 from rguenth at gcc dot gnu dot org 2006-11-27 11:52
---
Fixed (partly) on the mainline. We can now expand pow (x, n/2) and pow (x,
n/3)
properly using sqrt and/or cbrt, but cbrt is not available from the fortran
frontend (it misses to define __builtin_cbrt).
--
rgu
--- Comment #11 from rguenth at gcc dot gnu dot org 2006-11-04 15:01
---
Mine.
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
AssignedTo|unassign
--- Comment #10 from rguenther at suse dot de 2006-09-04 14:17 ---
Subject: Re: Missed optimization with power
On Mon, 4 Sep 2006, jv244 at cam dot ac dot uk wrote:
>
>
> --- Comment #9 from jv244 at cam dot ac dot uk 2006-09-04 14:10 ---
> (In reply to comment #7)
> > Look
--- Comment #9 from jv244 at cam dot ac dot uk 2006-09-04 14:10 ---
(In reply to comment #7)
> Looking at how we deal with all this, we seem to like pow() very much during
> folding, even doing the reverse transformations you suggest. The
> transformation
> back to sqrt ( x**N ) with N
--- Comment #8 from kargl at gcc dot gnu dot org 2006-01-13 19:58 ---
Technically, all of the transformations noted by Joost are
a violation of the Fortran standard with the possible
exception of the transformation of x**(1./3.) to cbrt(x).
See 7.1.7.2.
--
kargl at gcc dot gnu dot o
--- Comment #7 from rguenth at gcc dot gnu dot org 2006-01-13 18:42 ---
Looking at how we deal with all this, we seem to like pow() very much during
folding, even doing the reverse transformations you suggest. The
transformation
back to sqrt ( x**N ) with N being an integer could be don
--- Comment #6 from jv244 at cam dot ac dot uk 2006-01-13 18:15 ---
another example:
REAL*8 :: a,b
read(6,*) a
b=a**(3.D0/2.D0)
write(6,*) b
END
gets computed by ifort as
b=a*sqrt(a)
but this is also turned into pow by gfortran at -O3 -ffast-math
--
http://gcc.gnu.org/bugzilla/s
--- Comment #5 from jv244 at cam dot ac dot uk 2006-01-13 17:38 ---
I just note that ifort generates this in the asm
for a**(1./3.):
call cbrtf
and for a**(1.D0/3.D0)
call cbrt
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25620
--- Comment #4 from jv244 at cam dot ac dot uk 2006-01-13 17:33 ---
(In reply to comment #3)
> This needs to be done by the frontend, as the folded 2/3 or 4/3 is not exactly
> representable in the target FP format (and such cannot be checked for).
> Making
> this a frontend bug, rather
--- Comment #3 from rguenth at gcc dot gnu dot org 2006-01-13 16:44 ---
This needs to be done by the frontend, as the folded 2/3 or 4/3 is not exactly
representable in the target FP format (and such cannot be checked for). Making
this a frontend bug, rather than just closing as WONTFIX
13 matches
Mail list logo