Use proper probability (PR target/82927)
authorMartin Liska <mliska@suse.cz>
Wed, 15 Nov 2017 07:11:59 +0000 (08:11 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 15 Nov 2017 07:11:59 +0000 (07:11 +0000)
2017-11-15  Martin Liska  <mliska@suse.cz>

PR target/82927
* config/sh/sh-mem.cc: Use proper probability for
REG_BR_PROB_NOTE.

From-SVN: r254755

gcc/ChangeLog
gcc/config/sh/sh-mem.cc

index 08642663d953ea622a7e13b8304ec806650c6475..12ef4bd0544686dde96db20d1df6f8003c8e7e21 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-15  Martin Liska  <mliska@suse.cz>
+
+       PR target/82927
+       * config/sh/sh-mem.cc: Use proper probability for
+       REG_BR_PROB_NOTE.
+
 2017-11-14  Jeff Law  <law@redhat.com>
 
        * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
index 8fce97999214a07ac0e689a938f47b4eb81bcc42..4c33260d84e6a930cfc44a31bb545986806d45c5 100644 (file)
@@ -183,8 +183,12 @@ expand_block_move (rtx *operands)
   return false;
 }
 
-static const int prob_unlikely = REG_BR_PROB_BASE / 10;
-static const int prob_likely = REG_BR_PROB_BASE / 4;
+static const int prob_unlikely
+  = profile_probability::from_reg_br_prob_base (REG_BR_PROB_BASE / 10)
+    .to_reg_br_prob_note ();
+static const int prob_likely
+  = profile_probability::from_reg_br_prob_base (REG_BR_PROB_BASE / 4)
+    .to_reg_br_prob_note ();
 
 /* Emit code to perform a strcmp.