This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Integer constant multiplication on Alpha
- From: Jan Hubicka <jh at suse dot cz>
- To: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 20 Dec 2001 18:04:59 +0100
- Subject: Re: Integer constant multiplication on Alpha
- References: <87bsgtew0p.fsf@student.uni-tuebingen.de>
> Hi,
>
> I noticed gcc optimizes multiplications with integers quite good,
> which is nice, but I have a few questions :)
>
> * Where in the code does this happen? I looked quite hard, but
> couldn't find it.
See expand_mult in expemed.c
>
> * Why isn't this disabled on -Os?
It is bit dificult to judge when it expands code. For instance i386 do
have shorter shift/add instructions that mult. Backend needs to assist
and modify RTX_COST accordingly. See i386 how this can be done.
> Also gcc 3.0 introduces a redundant mov:
>
> mov $16,$1
> s4subq $1,$1,$2
> addq $2,$2,$1
> addl $1,$31,$0
> ret $31,($26),1
I do have patch for elliminating this mov somewhere in the queue, but it
never got reviewed.
Our copy propagation pass should be able to elliminate it, but unfortunately
it isn't.
Honza
>
> where could I look to check where this comes from?
>
> Falk