This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19803] __builtin_expect does not modify branch prediction for power4/5
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Feb 2005 03:39:46 -0000
- Subject: [Bug target/19803] __builtin_expect does not modify branch prediction for power4/5
- References: <20050207032408.19803.anton@samba.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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