diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 004711204a8..3ffe1d7347f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-13 Dragan Mladjenovic + + * config/mips/mips.md (rotr3): Sanitize the constant argument + instead of asserting its value. + 2019-11-13 Aldy Hernandez * gimple-fold.c (size_must_be_zero_p): Rewrite use of value_range diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 658f5e62b84..4de97318e67 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -5845,8 +5845,8 @@ "ISA_HAS_ROR" { if (CONST_INT_P (operands[2])) - gcc_assert (INTVAL (operands[2]) >= 0 - && INTVAL (operands[2]) < GET_MODE_BITSIZE (mode)); + operands[2] = GEN_INT (INTVAL (operands[2]) + & (GET_MODE_BITSIZE (mode) - 1)); return "ror\t%0,%1,%2"; }