[RFC PATCH]: Reciprocal sqrt (rsqrt) conversion pass
Michael Matz
matz@suse.de
Thu Jun 14 14:13:00 GMT 2007
Hi,
On Wed, 13 Jun 2007, Uros Bizjak wrote:
> Hello!
>
> Attached RFC patch implements reciprocal pass that converts sqrt to
> rsqrt. The pass converts several forms of sqrt:
>
> a / sqrt(b / c) => a * rsqrt (c / b)
>
> sqrt (a / b) => rsqrt ( b / a)
>
> sqrt (a) => a * rsqrt (a)
Um, no. At least the SSE rsqrt instructions have only results accurate to
12bits, they are not meant to be used by themself. I would be against
such transformation _even_ with unsafe-math-optims.
Ciao,
Michael.
More information about the Gcc-patches
mailing list