public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [DOC, RFC] Partial integration of sections: 3.18.54 x86 Options and 6.31.32 x86 Function Attributes
@ 2016-07-18 14:35 Martin Liška
  0 siblings, 0 replies; only message in thread
From: Martin Liška @ 2016-07-18 14:35 UTC (permalink / raw)
  To: GCC Development

Hello.

As mentioned in [1], we does not fully cover all i386 target options
in [2]. Apart from that, flag explanation is more brief than we've got in [3].

One example:

[3]:
-mrecip
This option enables use of RCPSS and RSQRTSS instructions (and their vectorized variants RCPPS and RSQRTPS) with an additional Newton-Raphson step to increase precision instead of DIVSS and SQRTSS (and their vectorized variants) for single-precision floating-point arguments. These instructions are generated only when -funsafe-math-optimizations is enabled together with -ffinite-math-only and -fno-trapping-math. Note that while the throughput of the sequence is higher than the throughput of the non-reciprocal instruction, the precision of the sequence can be decreased by up to 2 ulp (i.e. the inverse of 1.0 equals 0.99999994).
Note that GCC implements 1.0f/sqrtf(x) in terms of RSQRTSS (or RSQRTPS) already with -ffast-math (or the above option combination), and doesn't need -mrecip.

Also note that GCC emits the above sequence with additional Newton-Raphson step for vectorized single-float division and vectorized sqrtf(x) already with -ffast-math (or the above option combination), and doesn't need -mrecip. 

[2]:
‘recip’
‘no-recip’
Enable/disable the generation of RCPSS, RCPPS, RSQRTSS and RSQRTPS instructions followed an additional Newton-Raphson step instead of doing a floating-point division. 

I'm thinking whether it would be possible to tell that 'target (options)' accepts all options as mentioned in [3], expect ...
If it's acceptable opinion, I can prepare a patch.

Thanks,
Martin

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71652#c4
[2] https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes
[3] https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/x86-Options.html#x86-Options

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-18 14:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 14:35 [DOC, RFC] Partial integration of sections: 3.18.54 x86 Options and 6.31.32 x86 Function Attributes Martin Liška

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).