[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694 --- Comment #9 from Michael Meissner 2010-12-08 16:34:26 UTC --- Author: meissner Date: Wed Dec 8 16:34:20 2010 New Revision: 167594 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167594 Log: PR 42694: add checks to make sure sqrt is supported Added: trunk/gcc/testsuite/gcc.target/powerpc/ppc-pow.c Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c trunk/gcc/testsuite/ChangeLog
[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694 --- Comment #8 from Michael Meissner 2010-12-07 17:42:04 UTC --- Created attachment 22675 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22675 Add check for sqrt optab being present before doing some optimizations
[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
--- Comment #7 from meissner at gcc dot gnu dot org 2010-04-14 15:03 --- Fixed with subversion id 158346. -- meissner at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694
[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
--- Comment #6 from meissner at gcc dot gnu dot org 2010-04-14 15:02 --- Subject: Bug 42694 Author: meissner Date: Wed Apr 14 15:01:40 2010 New Revision: 158346 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158346 Log: PR 42694: Optimize pow (x, 0.25), pow (x, 0.75), pow (x, 1./6.) Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694
[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
--- Comment #5 from paolo dot carlini at oracle dot com 2010-01-26 10:03 --- With my "user of the compiler" hat, I must say that I was also put off by the 3 new switches... fwiw -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694
[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
--- Comment #4 from rguenth at gcc dot gnu dot org 2010-01-26 09:57 --- Ugh, I don't like more switches. Instead I would say that using two sqrt calls instead of one pow call is always profitable if not optimizing for size and the target has an optab for sqrt. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694
[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
--- Comment #3 from meissner at gcc dot gnu dot org 2010-01-26 00:40 --- Created an attachment (id=19706) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19706&action=view) Proposed patch to fix the problem Patch to add 3 new switches to tune whether to use a combination of sqrt/cbrt to replace pow. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694
[Bug middle-end/42694] Compiler could optimize pow (x, 0.75) into sqrt (x) * sqrt (sqrt (x))
--- Comment #2 from rguenth at gcc dot gnu dot org 2010-01-12 09:08 --- Confirmed and easy to add in the pow expander (expand_builtin_pow). -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||rguenth at gcc dot gnu dot ||org Severity|normal |enhancement Status|UNCONFIRMED |NEW Component|rtl-optimization|middle-end Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-01-12 09:08:00 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42694