This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49263] SH Target: underutilized "TST #imm, R0" instruction
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 28 Oct 2012 22:01:47 +0000
- Subject: [Bug target/49263] SH Target: underutilized "TST #imm, R0" instruction
- Auto-submitted: auto-generated
- References: <bug-49263-4@http.gcc.gnu.org/bugzilla/>
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.