diff options
author | Aaron Sawdey <acsawdey@linux.ibm.com> | 2019-02-09 17:06:12 +0000 |
---|---|---|
committer | Aaron Sawdey <acsawdey@gcc.gnu.org> | 2019-02-09 11:06:12 -0600 |
commit | 5585759fdb6cc1e870670970473b789b3b920961 (patch) | |
tree | cdd020d13aaba9dae98df324bea55e832bce0eba /gcc | |
parent | b9cee23e8625cbf971e2fd554b4aa10d95a668aa (diff) | |
download | gcc-5585759fdb6cc1e870670970473b789b3b920961.zip gcc-5585759fdb6cc1e870670970473b789b3b920961.tar.gz gcc-5585759fdb6cc1e870670970473b789b3b920961.tar.bz2 |
rs6000-string.c (expand_compare_loop, [...]): Insert REG_BR_PROB notes in inline expansion of memcmp/strncmp.
2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_compare_loop,
expand_block_compare): Insert REG_BR_PROB notes in inline expansion of
memcmp/strncmp.
From-SVN: r268724
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-string.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c6a97e1..b0cfc0f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com> + + * config/rs6000/rs6000-string.c (expand_compare_loop, + expand_block_compare): Insert REG_BR_PROB notes in inline expansion of + memcmp/strncmp. + 2019-02-09 Jakub Jelinek <jakub@redhat.com> PR middle-end/89246 diff --git a/gcc/config/rs6000/rs6000-string.c b/gcc/config/rs6000/rs6000-string.c index 7101dc7..560ecba 100644 --- a/gcc/config/rs6000/rs6000-string.c +++ b/gcc/config/rs6000/rs6000-string.c @@ -1525,6 +1525,7 @@ expand_compare_loop (rtx operands[]) else j = emit_jump_insn (gen_bdnztf_si (fc_loop, ctr, ctr, eqrtx, cond)); + add_reg_br_prob_note (j, profile_probability::likely ()); JUMP_LABEL (j) = fc_loop; LABEL_NUSES (fc_loop) += 1; @@ -1896,7 +1897,8 @@ expand_block_compare_gpr(unsigned HOST_WIDE_INT bytes, unsigned int base_align, rtx ne_rtx = gen_rtx_NE (VOIDmode, cond, const0_rtx); rtx ifelse = gen_rtx_IF_THEN_ELSE (VOIDmode, ne_rtx, cvt_ref, pc_rtx); - rtx j = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse)); + rtx_insn *j = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse)); + add_reg_br_prob_note (j, profile_probability::likely ()); JUMP_LABEL (j) = convert_label; LABEL_NUSES (convert_label) += 1; } |