diff options
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e9e12f5..41f53ad 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -21432,14 +21432,15 @@ output_cbranch (rtx op, const char *label, int reversed, rtx_insn *insn) /* PROB is the difference from 50%. */ int prob = XINT (note, 0) - REG_BR_PROB_BASE / 2; - /* Only hint for highly probable/improbable branches on newer - cpus as static prediction overrides processor dynamic - prediction. For older cpus we may as well always hint, but + /* Only hint for highly probable/improbable branches on newer cpus when + we have real profile data, as static prediction overrides processor + dynamic prediction. For older cpus we may as well always hint, but assume not taken for branches that are very close to 50% as a mispredicted taken branch is more expensive than a mispredicted not-taken branch. */ if (rs6000_always_hint || (abs (prob) > REG_BR_PROB_BASE / 100 * 48 + && (profile_status_for_fn (cfun) != PROFILE_GUESSED) && br_prob_note_reliable_p (note))) { if (abs (prob) > REG_BR_PROB_BASE / 20 |