public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/28252]  New: pow(x,1/3.0) should be converted to cbrt(x)
@ 2006-07-04 22:23 fxcoudert at gcc dot gnu dot org
  2006-07-04 22:52 ` [Bug middle-end/28252] " rguenth at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-07-04 22:23 UTC (permalink / raw)
  To: gcc-bugs

pow(x,1/3.0) isn't converted to cbrt(x), even though cbrt() is C99 and thus
widely available.


-- 
           Summary: pow(x,1/3.0) should be converted to cbrt(x)
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28252


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/28252] pow(x,1/3.0) should be converted to cbrt(x)
  2006-07-04 22:23 [Bug middle-end/28252] New: pow(x,1/3.0) should be converted to cbrt(x) fxcoudert at gcc dot gnu dot org
@ 2006-07-04 22:52 ` rguenth at gcc dot gnu dot org
  2006-07-05  8:26 ` uros at kss-loka dot si
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-04 22:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2006-07-04 22:52 -------
Confirmed.  Whether it's a good idea is another question.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-04 22:52:33
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28252


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/28252] pow(x,1/3.0) should be converted to cbrt(x)
  2006-07-04 22:23 [Bug middle-end/28252] New: pow(x,1/3.0) should be converted to cbrt(x) fxcoudert at gcc dot gnu dot org
  2006-07-04 22:52 ` [Bug middle-end/28252] " rguenth at gcc dot gnu dot org
@ 2006-07-05  8:26 ` uros at kss-loka dot si
  2006-07-05  8:27 ` uros at kss-loka dot si
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: uros at kss-loka dot si @ 2006-07-05  8:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from uros at kss-loka dot si  2006-07-05 08:25 -------
Created an attachment (id=11824)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11824&action=view)
Patch to implement pow(x,1.0/3.0) = cbrt(x) optimization

I have the patch that implements the optimization ready, just waiting for the
mainline to open again. Should I post it to gcc-patches anyway?

2006-07-05  Uros Bizjak  <uros@kss-loka.si>

        * builtins.c (fold_builtin): Fold pow(x,1.0/3.0) as cbrt(x) if
        flag_unsafe_math_optimizations is set.

testsuite:

        * gcc.dg/builtins-8.c: Also check pow(x,1.0/3.0) to cbrt(x)
        transformation.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28252


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/28252] pow(x,1/3.0) should be converted to cbrt(x)
  2006-07-04 22:23 [Bug middle-end/28252] New: pow(x,1/3.0) should be converted to cbrt(x) fxcoudert at gcc dot gnu dot org
  2006-07-04 22:52 ` [Bug middle-end/28252] " rguenth at gcc dot gnu dot org
  2006-07-05  8:26 ` uros at kss-loka dot si
@ 2006-07-05  8:27 ` uros at kss-loka dot si
  2006-07-06  8:57 ` steven at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: uros at kss-loka dot si @ 2006-07-05  8:27 UTC (permalink / raw)
  To: gcc-bugs



-- 

uros at kss-loka dot si changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |uros at kss-loka dot si
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-07-04 22:52:33         |2006-07-05 08:26:53
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28252


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/28252] pow(x,1/3.0) should be converted to cbrt(x)
  2006-07-04 22:23 [Bug middle-end/28252] New: pow(x,1/3.0) should be converted to cbrt(x) fxcoudert at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-07-05  8:27 ` uros at kss-loka dot si
@ 2006-07-06  8:57 ` steven at gcc dot gnu dot org
  2006-10-21 20:05 ` uros at gcc dot gnu dot org
  2006-10-21 21:26 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-07-06  8:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from steven at gcc dot gnu dot org  2006-07-06 08:57 -------
Uros,

You could post it now, just so that people can have a look at it and maybe
suggest some changes. You know how that goes.

It would be interesting to see if this actually gives speedups...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28252


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/28252] pow(x,1/3.0) should be converted to cbrt(x)
  2006-07-04 22:23 [Bug middle-end/28252] New: pow(x,1/3.0) should be converted to cbrt(x) fxcoudert at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-07-06  8:57 ` steven at gcc dot gnu dot org
@ 2006-10-21 20:05 ` uros at gcc dot gnu dot org
  2006-10-21 21:26 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: uros at gcc dot gnu dot org @ 2006-10-21 20:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from uros at gcc dot gnu dot org  2006-10-21 20:05 -------
Subject: Bug 28252

Author: uros
Date: Sat Oct 21 20:05:35 2006
New Revision: 117937

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117937
Log:
2006-10-21  Uros Bizjak  <uros@kss-loka.si>

        PR middle-end/28252
        * builtins.c (fold_builtin): Fold pow(x,1.0/3.0) as cbrt(x) if
        flag_unsafe_math_optimizations is set.

testsuite/ChangeLog:

        PR middle-end/28252
        * gcc.dg/builtins-8.c: Also check pow(x,1.0/3.0) to cbrt(x)
        transformation.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/builtins-8.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28252


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug middle-end/28252] pow(x,1/3.0) should be converted to cbrt(x)
  2006-07-04 22:23 [Bug middle-end/28252] New: pow(x,1/3.0) should be converted to cbrt(x) fxcoudert at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-10-21 20:05 ` uros at gcc dot gnu dot org
@ 2006-10-21 21:26 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-21 21:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-10-21 21:26 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28252


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-21 21:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-04 22:23 [Bug middle-end/28252] New: pow(x,1/3.0) should be converted to cbrt(x) fxcoudert at gcc dot gnu dot org
2006-07-04 22:52 ` [Bug middle-end/28252] " rguenth at gcc dot gnu dot org
2006-07-05  8:26 ` uros at kss-loka dot si
2006-07-05  8:27 ` uros at kss-loka dot si
2006-07-06  8:57 ` steven at gcc dot gnu dot org
2006-10-21 20:05 ` uros at gcc dot gnu dot org
2006-10-21 21:26 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).