On 07/10/2017 05:10 PM, Georg-Johann Lay wrote:
> (set (zero_extract:QI (reg/i:QI 24 r24)
>         (const_int 1 [0x1])
>         (const_int 6 [0x6]))
>     (lshiftrt:QI (reg:QI 52)
>         (const_int 6 [0x6])))

> The problem is that the backend only sees
> 
> avr_rtx_costs[bset:combine(266)]=true (size) total=24, outer=set:
> (lshiftrt:QI (reg:QI 52)
>     (const_int 6 [0x6]))

> How can I fix that?

I've thought for a while is that (set (zero_extract)) is a crazy way to
express this kind of operation. This should be

(set (destreg) (bfinsert (input) (bitpos) (len) (value))

Adding an rtx code like that is trivial, but ideally all the code that
understands set of zero_extract would also be updated to understand the
new form.


Bernd

Reply via email to