[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] tcg/i386: Use ANDN instruction
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] tcg/i386: Use ANDN instruction |
Date: |
Mon, 17 Feb 2014 10:18:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 02/16/2014 12:12 PM, Aurelien Jarno wrote:
> On Fri, Jan 31, 2014 at 08:43:37AM -0600, Richard Henderson wrote:
>> > Note that the optimizer cannot simplify ANDC X,Y,C to AND X,Y,~C
>> > so we must handle constants in the implementation of andc.
> I do wonder if it actually won't be a better idea to add this
> simplification to the optimizer instead of adding it to the backend.
>
> The best to do that would be to check with tcg_target_const_match to
> see if ANDC would accept such a constraint and to convert it to AND
> if not.
>
> The same can probably be done for ORC.
>
I suppose we could. There are plenty of pairs for which this could apply, even
add/sub, though so far we've forced the backend to take care of that.
Perhaps if I have time I'll work something up for tcg_reg_alloc_op and see how
much savings we can achieve across the backends. That'll tell us if it's worth
bothering with.
r~