This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH]: Reciprocal sqrt (rsqrt) conversion pass


On 6/14/07, Michael Matz <matz@suse.de> wrote:

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

This is referenced to an early RFC patch. Final version has NR enhancement step and works OK with adequate precision.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]