summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-11-15 07:11:59 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-11-15 07:11:59 +0000
commit0afa0621c33c4c9a753dd3de8c37a6ae87fb396e (patch)
tree4cfe94ef9a82e8bd436cc792743c645d4baa783b
parentf1278899f0156de5cc8d450153ade046d189852d (diff)
downloadgcc-0afa0621c33c4c9a753dd3de8c37a6ae87fb396e.tar.gz
Use proper probability (PR target/82927)
2017-11-15 Martin Liska <mliska@suse.cz> PR target/82927 * config/sh/sh-mem.cc: Use proper probability for REG_BR_PROB_NOTE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254755 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh-mem.cc8
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 08642663d95..12ef4bd0544 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/sh/sh-mem.cc b/gcc/config/sh/sh-mem.cc
index 8fce9799921..4c33260d84e 100644
--- a/gcc/config/sh/sh-mem.cc
+++ b/gcc/config/sh/sh-mem.cc
@@ -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.