This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH]: Reciprocal sqrt (rsqrt) conversion pass
- From: Michael Matz <matz at suse dot de>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Guenther <rguenther at suse dot de>, Andrew Pinski <pinskia at gmail dot com>
- Date: Thu, 14 Jun 2007 16:07:28 +0200 (CEST)
- Subject: Re: [RFC PATCH]: Reciprocal sqrt (rsqrt) conversion pass
- References: <5787cf470706130335k103552c8hcd58931a87b07328@mail.gmail.com>
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.