]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
authoracsawdey <acsawdey@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Feb 2019 17:06:12 +0000 (17:06 +0000)
committeracsawdey <acsawdey@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Feb 2019 17:06:12 +0000 (17:06 +0000)
* config/rs6000/rs6000-string.c (expand_compare_loop,
expand_block_compare): Insert REG_BR_PROB notes in inline expansion of
memcmp/strncmp.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268724 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000-string.c

index c6a97e1b4c0de0ec5f4b34c237aecefc22a56bb5..b0cfc0f1ed5ab55f05a9fb5ac8b0780287ee67aa 100644 (file)
@@ -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
index 7101dc77e081570b654fb8730dc625243d637359..560ecbaccc7b203b0b6f859eca76fca7488996f1 100644 (file)
@@ -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;
            }