public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/32392] New: Support using -mrecip w/o additional Newton-Raphson run
@ 2007-06-18 14:32 burnus at gcc dot gnu dot org
2007-06-18 15:03 ` [Bug target/32392] " burnus at gcc dot gnu dot org
2007-06-19 9:15 ` rguenth at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-18 14:32 UTC (permalink / raw)
To: gcc-bugs
Paolo Bonzini wrote:
>> That said, there is a whole bunch of applications that would kill for -mrecip,
> even for 11bit ones. Games are one of them, for sure ;)
> What about -mrecip=0/1/2 for the number of NR steps? Or would two steps be
> slower than divss?
>
> I was thinking of adding this as a follow-up patch ;) Just look how the
> operations are grouped together.
As Richard pointed out: Having two NR does not make sense. For some cases doing
with out Newton-Raphson is enough. (Example: Games -- or SPEC CPU 2006:
http://www.hpcwire.com/hpc/1556972.html)
Other compilers have this option, e.g. Pathscale's -OPT:rsqrt=2 [yes, this is
used for SPEC runs ;-)]
--
Summary: Support using -mrecip w/o additional Newton-Raphson run
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
GCC target triplet: x86_64-*-* i686-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32392
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/32392] Support using -mrecip w/o additional Newton-Raphson run 2007-06-18 14:32 [Bug target/32392] New: Support using -mrecip w/o additional Newton-Raphson run burnus at gcc dot gnu dot org @ 2007-06-18 15:03 ` burnus at gcc dot gnu dot org 2007-06-19 9:15 ` rguenth at gcc dot gnu dot org 1 sibling, 0 replies; 3+ messages in thread From: burnus at gcc dot gnu dot org @ 2007-06-18 15:03 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from burnus at gcc dot gnu dot org 2007-06-18 15:03 ------- Initial suggestion, see: http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01068.html Richard's remark: http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01224.html > Two NR steps don't make sense, they wouldn't improve accuracy because of the > extra roundings we get for the NR. And of course it would be slower. (However, two NR are said to be enough for double precision. I don't know whether doing rsqrt+(2x NR) is faster than 1/sqrt() for double or not.) Related - closed - PRs: PR 31723 - Use reciprocal and reciprocal square root with -ffast-math (FIXED) PR 32352 - Using rsqrt, Polyhedron's aermod test crashes (WONTFIX) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32392 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/32392] Support using -mrecip w/o additional Newton-Raphson run 2007-06-18 14:32 [Bug target/32392] New: Support using -mrecip w/o additional Newton-Raphson run burnus at gcc dot gnu dot org 2007-06-18 15:03 ` [Bug target/32392] " burnus at gcc dot gnu dot org @ 2007-06-19 9:15 ` rguenth at gcc dot gnu dot org 1 sibling, 0 replies; 3+ messages in thread From: rguenth at gcc dot gnu dot org @ 2007-06-19 9:15 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from rguenth at gcc dot gnu dot org 2007-06-19 09:15 ------- Confirmed. For 2 NR steps to reach double precision (we'd miss it by some more ulps than the 2.5 for float precision) we would need to do at least the second NR in double precision. Note that this would make sense only for double precision input values that are exactly representable in float precision (otherwise, why the extra precision?). So practically not worth it. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-06-19 09:15:09 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32392 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-19 9:15 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-06-18 14:32 [Bug target/32392] New: Support using -mrecip w/o additional Newton-Raphson run burnus at gcc dot gnu dot org 2007-06-18 15:03 ` [Bug target/32392] " burnus at gcc dot gnu dot org 2007-06-19 9:15 ` rguenth 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).