http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #30889|0 |1
is obsolete| |
--- Comment #69 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 30953
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30953&action=edit
RTL pass
(In reply to Oleg Endo from comment #68)
> Created attachment 30889 [details]
> RTL pass
>
> An updated patch that adds an SH specific RTL pass against current trunk
> (rev 202873), not fully tested.
>
> CSiBE for '-m2a-single -O2' and '-m4-single -mpretend-cmove -O2' look OK.
> There are only 2 cases that got actually worse in the set:
>
>
> linux-2.4.23-pre3-testplatform/net/ipv4/igmp.s (add_grec):
>
> before:
> .L459:
> bt .L294
> mov.l @(24,r13),r1
> tst r1,r1
> bt/s .L295
> add #64,r1
> mov r13,r2
> add #64,r2
> mov.l @(36,r1),r1
> mov.l @(32,r2),r2
> sub r2,r1
> mov #11,r2
> cmp/hs r1,r2
> .L296:
> bf/s .L294
> mov r13,r4
> mov.l .L408,r0
> jsr @r0
> mov #0,r13
>
> after:
> .L459:
> bt .L294
> mov.l @(24,r13),r1
> tst r1,r1
> bt .L295
> add #64,r1
> mov r13,r2
> add #64,r2
> mov.l @(36,r1),r1
> mov.l @(32,r2),r2
> sub r2,r1
> mov #11,r2
> cmp/hs r1,r2
> movt r1
> .L296:
> tst r1,r1
> bt/s .L294
> mov r13,r4
> mov.l .L408,r0
> jsr @r0
> mov #0,r13
That case didn't get worse, it actually improved. The 'before' code is wrong
code, due to a missed BB that sets the tested 'r1' reg to '1'.
Testing the previous version of the RTL pass (attachment 30889) against trunk
rev 202876 revealed a defect in the function 'trace_reg_uses'. The attached
updated version fixes this.