This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/49263] SH Target: underutilized "TST #imm, R0" instruction


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49263

--- Comment #19 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-10-28 22:01:47 UTC ---
Another thing I've noticed...
Cases such as:

        mov.l   r0,@r2        ! LS
        mov     r13,r0        ! MT
        and     #7,r0         ! EX
        tst     r0,r0         ! MT
        bt/s    .L8           ! BR
        mov.l   r0,@(16,r1)

where the result of the and op is re-used would be slightly better as:

        mov.l   r0,@r2       ! LS
        mov     r13,r0       ! MT
        tst     #7,r0        ! MT
        and     #7,r0        ! EX
        bt/s    .L8          ! BR
        mov.l   r0,@(16,r1)

because it reduces dependency on the result of the and op and thus has a higher
chance to be executed in parallel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]