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/19803] __builtin_expect does not modify branch prediction for power4/5


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-07 03:39 -------
(In reply to comment #1)
> builtin_expect uses PROB_VERY_LIKELY.
> 
> But powerpc64 only emits branch prediction hints when at 2% / 98%.  See
> rs6000.c:output_cbranch
This is a target problem as mentioned above.

Hmm, I thought there was a patch floating around to fix this but I could be wrong.

Also note this changed back in 2002 for power4:
<http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00149.html> so in a way it could be considered a 
regression.
It also effects power5 also (and ppc970).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
          Component|tree-optimization           |target
 GCC target triplet|powerpc64-unknown-linux-gnu |powerpc*-*-*
            Summary|__builtin_expect doesnt     |__builtin_expect does not
                   |modify branch prediction for|modify branch prediction for
                   |power4 target               |power4/5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19803


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