This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: simplify multiplication by reciprocals to division
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, patches at x86-64 dot org, timothy dot c dot prince at intel dot com
- Subject: Re: simplify multiplication by reciprocals to division
- From: Jan Hubicka <jh at suse dot cz>
- Date: Mon, 16 Jul 2001 23:16:32 +0200
- References: <20010716224027.E29145@atrey.karlin.mff.cuni.cz> <20010716141221.B11097@redhat.com>
> On Mon, Jul 16, 2001 at 10:40:27PM +0200, Jan Hubicka wrote:
> > * combine.c (combine_simplify_rtx): Attempt to simplify
> > a*(b/c) as (a*b)/c for floats in unsafe_math mode.
>
> Presumably C is a constant and B isn't? I'd think you'd
> only want to do this under those conditions, which you
> aren't checking.
What I do is to call the simplify-rtx, that will suceed only
if the value is nice constant.
It will work only in case both a and b are constants, or
b is eighter 1 or -1.
Honza
>
>
> r~