2012/2/16 Georg-Johann Lay <a...@gjlay.de>:
> neghi2's "r,0" alternative reads
>
> com %B0
> neg %A0
> sbc %B0,__zero_reg__
> inc %B0
>
> The INC commutates with the NEG+SBC and can be moved 2 instructions up:
>
> com %B0
> inc %B0
> neg %A0
> sbc %B0,__zero_reg__
>
> COM+INC can be fused to NEG:
>
> neg %B0
> neg %A0
> sbc %B0,__zero_reg__
>
> with the additional benefit that cc0 is always set_czn now.
>
> The *dec-and-branchhi!=-1 text peephole just coverd vanilla addhi3 without
> clobber register.  As addhi3 now has a clobber added in many cases,
> that peephole don't match them any more.  The patch adds peephole alternatives
> for clobber variants of addhi3.
>
> Passed without regressions.
>
> Ok to apply?
>
> Johann
>
>        * config/avr/avr.md (neghi2): Remove "!d,0" alternative. Tweak "r,0".
>        (*dec-and-branchhi!=-1.d.clobber): New text peephole.
>        (*dec-and-branchhi!=-1.l.clobber): New text peephole.
>

Approved.

Denis.

Reply via email to