On Wed, 4 May 2011, Eric Botcazou wrote:

> > 2011-05-03  Richard Guenther  <rguent...@suse.de>
> >
> >     * expmed.c (expand_variable_shift): Rename to ...
> >     (expand_shift_1): ... this.  Take an expanded shift amount.
> >     For rotates recurse directly not building trees for the shift amount.
> >     (expand_variable_shift): Wrap around expand_shift_1.
> >     (expand_shift): Adjust.
> 
> Looks OK on principle, but...
> 
> > --- 2140,2161 ----
> >              code below.  */
> >
> >           rtx subtarget = target == shifted ? 0 : target;
> > !         rtx new_amount, other_amount;
> >           rtx temp1;
> > !
> > !         new_amount = amount;
> >           other_amount
> > !           = simplify_gen_binary (MINUS, GET_MODE (amount),
> > !                                  GEN_INT (GET_MODE_BITSIZE (mode)),
> > !                                  amount);
> 
> ... why going back to AMOUNT?  The old code uses OP1, which can be different 
> from AMOUNT if SHIFT_COUNT_TRUNCATED is nonzero.

I think I did it that way because the old code tried to re-construct
the type of the original amount.  I can surely simply use op1 here
if that is preferred.

Btw, do you happen to know any target that would excercise this code
choosing from x86, ppc, s390 and ia64?

Thanks,
Richard.

Reply via email to