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


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.


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