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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |msebor at gcc dot gnu.org
      Known to work|                            |4.8.5, 6.0
         Resolution|---                         |FIXED

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
This appears to have improved.  Current trunk (as well as 4.8.5) emit what
looks like optimal code at both -O2 and -O3.  Resolving as fixed.

.L.foo:
        addis 10,2,.LC0@toc@ha          # gpr load fusion, type long
        ld 10,.LC0@toc@l(10)
        addis 9,2,.LC1@toc@ha           # gpr load fusion, type long
        ld 9,.LC1@toc@l(9)
        addis 8,2,.LC2@toc@ha           # gpr load fusion, type long
        ld 8,.LC2@toc@l(8)
        ld 7,0(10)
        ld 9,0(9)
        addis 10,2,.LC3@toc@ha          # gpr load fusion, type long
        ld 10,.LC3@toc@l(10)
        subf 9,9,7
        stw 9,0(8)
        std 9,0(10)
        blr

Reply via email to