From: John Darrington Date: Tue, 9 Jul 2019 19:11:27 +0000 (+0000) Subject: simplify-rtx.c (simplify_unary_operation_1): Use GET_MODE_PRECISION rather than GET_M... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4faba5c3bc37c0bfceec6b254d76c5d0b3e2fe8b;p=gcc.git simplify-rtx.c (simplify_unary_operation_1): Use GET_MODE_PRECISION rather than GET_MODE_BITSIZE to better handle partial... 2019-07-09 John Darrington * simplify-rtx.c (simplify_unary_operation_1): Use GET_MODE_PRECISION rather than GET_MODE_BITSIZE to better handle partial integer modes. From-SVN: r273312 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3872b6dbb8a..2061c1bb50f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-07-09 John Darrington + + * simplify-rtx.c (simplify_unary_operation_1): Use GET_MODE_PRECISION + rather than GET_MODE_BITSIZE to better handle partial integer modes. + 2019-07-09 Michael Meissner * config/rs6000/rs6000-internal.h (create_TOC_reference): Delete. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index dd2acd4eca9..4892c49efcd 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 (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 =