[Bug target/85216] Performance issue with PHP on ppc64 systems

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 5 00:28:00 GMT 2018


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
   Last reconfirmed|2018-04-05 00:00:00         |
         Resolution|---                         |INVALID

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is 100% the equivalent code.

jmp     *(%r15) # opline.199_67->handler
Does two things:
loads a pointer from %r15 and then jumps to that pointer.

In PowerPC, you can only jump indirectly via the CTR or LR registers.

        ld 9,0(29)       # opline.200_67->handler, gotovar.1505_2678
        mtctr 9  # gotovar.1505_2678, gotovar.1505_2678
        bctr


Most likely what is happening is the indirect branch predictor is not
predicting the branch correctly on the powerpc side while it is on the x86
side.  This is a micro-architecture difference between the two chips and is
unrelated to the ISA differences.


More information about the Gcc-bugs mailing list