--- gcc/ChangeLog | 6 ++++++ gcc/simplify-rtx.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c206ab6..47035ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-03 John Darrington <j...@darrington.wattle.id.au> + + simplify-rtx.c: Change BITSIZE to UNIT_PRECISION in simplification of + (extend ashiftrt (ashift ..))) Otherwise the gcc_assert will catch + when dealing with partial int modes. + 2019-07-02 Eric Botcazou <ebotca...@adacore.com> * cfgexpand.c (pass_expand::execute): Deal specially with instructions diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 89a46a9..d74a4ba 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1504,12 +1504,12 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op) && CONST_INT_P (XEXP (op, 1)) && XEXP (XEXP (op, 0), 1) == XEXP (op, 1) && (op_mode = as_a <scalar_int_mode> (GET_MODE (op)), - GET_MODE_BITSIZE (op_mode) > INTVAL (XEXP (op, 1)))) + GET_MODE_UNIT_PRECISION (op_mode) > INTVAL (XEXP (op, 1)))) { scalar_int_mode tmode; - gcc_assert (GET_MODE_BITSIZE (int_mode) - > GET_MODE_BITSIZE (op_mode)); - if (int_mode_for_size (GET_MODE_BITSIZE (op_mode) + gcc_assert (GET_MODE_UNIT_PRECISION (int_mode) + > GET_MODE_UNIT_PRECISION (op_mode)); + if (int_mode_for_size (GET_MODE_UNIT_PRECISION (op_mode) - INTVAL (XEXP (op, 1)), 1).exists (&tmode)) { rtx inner = -- 1.8.3.1