gcc/ * simplify-rtx.c (simplify_unary_operation_1): Change BITSIZE to PRECISION in simplification of (extend ashiftrt (ashift ..))) Otherwise the gcc_assert can catch when dealing with partial int modes. --- gcc/ChangeLog | 6 ++++++ gcc/simplify-rtx.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d3d359..919b9e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-04 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-04 Jakub Jelinek <ja...@redhat.com> * omp-low.c (lower_omp_scan): Call lower_omp on stmt's body diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 89a46a9..d1cd428 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_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_PRECISION (int_mode) + > GET_MODE_PRECISION (op_mode)); + if (int_mode_for_size (GET_MODE_PRECISION (op_mode) - INTVAL (XEXP (op, 1)), 1).exists (&tmode)) { rtx inner = -- 1.8.3.1