This is the mail archive of the
mailing list for the GCC project.
Re: Optimizing floating point *(2^c) and /(2^c)
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 01 Apr 2010 18:20:48 +0200
- Subject: Re: Optimizing floating point *(2^c) and /(2^c)
- References: <firstname.lastname@example.org> <8369F83F-8021-4654-8266-7D2A89920FED@adacore.com> <email@example.com> <20100331023750.GK14245@prunille.vinc17.org> <alpine.DEB.firstname.lastname@example.org> <20100331092539.GL14245@prunille.vinc17.org>
On 03/31/2010 11:25 AM, Vincent Lefevre wrote:
On 2010-03-31 11:04:03 +0200, Marc Glisse wrote:
IMHO this transformation mostly makes sense for the
-ffinite-math-only case where you can replace: "put a constant and
multiply/divide" by "put a constant and add/sub" and never care
about extracting the exponent, overflowing, or anything else. And in
that case, it does look like a nice optimization.
I suppose that this could be interesting only if a same register
can be seen as a FP one and an integer one (for the addition on
the exponent field), hoping that mixing both kinds of operations
won't stall the pipeline.
Indeed, this is a problem on Intel chips looking at the definition of
TARGET_SSE_TYPELESS_STORES (search for X86_TUNE_SSE_TYPELESS_STORES in