diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-07-03 14:17:59 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-07-03 12:17:59 +0000 |
commit | edfe99a43c4c1b96132511c45c1cc0e627c4e1be (patch) | |
tree | 41816725acdbb28c440b96e080188f465dae969b /gcc/loop-doloop.c | |
parent | da4029679e2be30dc78f3f3a016226f6e2299abb (diff) | |
download | gcc-edfe99a43c4c1b96132511c45c1cc0e627c4e1be.zip gcc-edfe99a43c4c1b96132511c45c1cc0e627c4e1be.tar.gz gcc-edfe99a43c4c1b96132511c45c1cc0e627c4e1be.tar.bz2 |
re PR target/81285 (r249888 breaks bootstrap on ppc64le)
PR bootstrap/81285
* loop-doloop.c (add_test): Update profile.
From-SVN: r249904
Diffstat (limited to 'gcc/loop-doloop.c')
-rw-r--r-- | gcc/loop-doloop.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index 13bf8cf..b4995b3 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -347,6 +347,8 @@ add_test (rtx cond, edge *e, basic_block dest) rtx op0 = XEXP (cond, 0), op1 = XEXP (cond, 1); enum rtx_code code = GET_CODE (cond); basic_block bb; + /* The jump is supposed to handle an unlikely special case. */ + profile_probability prob = profile_probability::guessed_never (); mode = GET_MODE (XEXP (cond, 0)); if (mode == VOIDmode) @@ -357,7 +359,7 @@ add_test (rtx cond, edge *e, basic_block dest) op1 = force_operand (op1, NULL_RTX); label = block_label (dest); do_compare_rtx_and_jump (op0, op1, code, 0, mode, NULL_RTX, NULL, label, - profile_probability::uninitialized ()); + prob); jump = get_last_insn (); if (!jump || !JUMP_P (jump)) @@ -387,12 +389,14 @@ add_test (rtx cond, edge *e, basic_block dest) JUMP_LABEL (jump) = label; - /* The jump is supposed to handle an unlikely special case. */ - add_int_reg_note (jump, REG_BR_PROB, 0); - LABEL_NUSES (label)++; - make_edge (bb, dest, (*e)->flags & ~EDGE_FALLTHRU); + edge e2 = make_edge (bb, dest, (*e)->flags & ~EDGE_FALLTHRU); + e2->probability = prob; + e2->count = e2->src->count.apply_probability (prob); + (*e)->probability = prob.invert (); + (*e)->count = (*e)->count.apply_probability (prob); + update_br_prob_note (e2->src); return true; } |