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/70989] [SH] Further improve utilization of zero-displacement conditional branches


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70989

--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Another case from bzlib.c:

.L820:
        bt      .L823
        mov.l   r0,@r7
.L823:
        tst     r11,r11
        bt/s    .L824      <<< convert to zero-displacement cbranch
        mov     #0,r1      <<< move common insn from successor bb to this bb
        mov.l   r1,@r11
.L824:
        tst     r12,r12
        bt/s    .L825
        mov     #0,r1      <<< likewise
        mov.l   r1,@r12
.L825:


result (1):

.L820:
        bt      .L823
        mov.l   r0,@r7
.L823:
        tst     r11,r11
        mov     #0,r1      <<< now r1 can be propagated into successor blocks
        bt      .L824
        mov.l   r1,@r11
.L824:
        mov     #0,r1
        tst     r12,r12
        bt      .L825
        mov.l   r1,@r12
.L825:

result (2):

.L820:
        bt      .L823
        mov.l   r0,@r7
.L823:
        tst     r11,r11
        mov     #0,r1
        bt      .L824
        mov.l   r1,@r11
.L824:
        tst     r12,r12
        bt      .L825
        mov.l   r1,@r12
.L825:

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