On Mon, Jun 20, 2011 at 7:19 AM, William J. Schmidt
<wschm...@linux.vnet.ibm.com> wrote:
> On Thu, 2011-06-16 at 09:49 -0700, Richard Henderson wrote:
>> On 06/16/2011 04:35 AM, Richard Guenther wrote:
>> >
>> > +     /* Bit-field insertion needs several shift and mask operations.  */
>> > +     case BIT_FIELD_EXPR:
>> > +       return 3;
>>
>> ... depending on the target, of course.
>>
>
> Agreed -- this is a single-instruction operation on PowerPC.  Probably
> need some target-specific weights here.

It is also a single instruction on MIPS32R2 and MIPS64R2.  So a target
hook is the best here rather than a constant number in the target hook
field.

Thanks,
Andrew Pinski

Reply via email to