This fixes the bootstrap failure triggered by the recent changes wrt
branch probabilities aka emit_cmp_and_jump_insns does not accept
integers as branch probability anymore.

Regressiontested on s390x.

gcc/ChangeLog:

2017-06-30  Andreas Krebbel  <kreb...@linux.vnet.ibm.com>

        * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
        type for branch probabilities.
---
 gcc/config/s390/s390.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index bfc38db..958ee3b 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -5349,8 +5349,6 @@ s390_expand_movmem (rtx dst, rtx src, rtx len)
 void
 s390_expand_setmem (rtx dst, rtx len, rtx val)
 {
-  const int very_unlikely = REG_BR_PROB_BASE / 100 - 1;
-
   if (GET_CODE (len) == CONST_INT && INTVAL (len) <= 0)
     return;
 
@@ -5424,7 +5422,7 @@ s390_expand_setmem (rtx dst, rtx len, rtx val)
       convert_move (count, len, 1);
       emit_cmp_and_jump_insns (count, const0_rtx,
                               EQ, NULL_RTX, mode, 1, zerobyte_end_label,
-                              very_unlikely);
+                              profile_probability::very_unlikely ());
 
       /* We need to make a copy of the target address since memset is
         supposed to return it unmodified.  We have to make it here
@@ -5441,7 +5439,8 @@ s390_expand_setmem (rtx dst, rtx len, rtx val)
          dstp1 = adjust_address (dst, VOIDmode, 1);
          emit_cmp_and_jump_insns (count,
                                   const1_rtx, EQ, NULL_RTX, mode, 1,
-                                  onebyte_end_label, very_unlikely);
+                                  onebyte_end_label,
+                                  profile_probability::very_unlikely ());
        }
 
       /* There is one unconditional (mvi+mvc)/xc after the loop
-- 
2.9.1

Reply via email to