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

--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
To make clear what I meant by "not optimal" in comment #4, and focusing on
powepc64le output with -O2 for the test case in comment #1, trunk (6.0) emits
the code below.  The first branch (to .L2) is superfluous given the second (to
.L9).  

_bfd_xcoff_canonicalize_dynamic_reloc:
.LCF0:
0:      addis 2,12,.TOC.-.LCF0@ha
        addi 2,2,.TOC.-.LCF0@l
        cmpldi 7,3,2
        bgt 7,.L2   <<< superfluous branch
        beq 7,.L9
.L2:
        blr
        .p2align 4,,15
.L9:
        mflr 0
        std 0,16(1)
        stdu 1,-96(1)
        bl _bfd_abort
        nop
        addi 1,1,96
        ld 0,16(1)
        mtlr 0
        blr

Reply via email to