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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot 
com

--- Comment #22 from Roger Sayle <roger at nextmovesoftware dot com> ---
I think this is now fixed on mainline?  Alas godbolt doesn't provide a
historical suite of GCC compilers for powerpc64, so figuring out exactly when
this was resolved is non-trivial.  However, a cross-compiler to
powerpc64-linux-gnu currently generates the following for lookup with -O2:

lookup: ld 8,.LC0@toc(2)
        ld 9,0(8)
        cmpd 0,9,8
        bne 0,.L3
        b .L4
.L8:    ld 9,0(9)
        cmpd 0,9,8
        beq 0,.L4
.L3:    lwz 10,16(9)
        cmpw 0,10,3
        bne 0,.L8
        li 3,1
        extsw 3,3
        blr
.L4:    li 3,0
        extsw 3,3
        blr

Only one mention of "toc".  Apologies if this is an inappropriate metric.
  • [Bug target/54063] [9/10/11... roger at nextmovesoftware dot com via Gcc-bugs

Reply via email to