aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorJohn Darrington <john@darrington.wattle.id.au>2019-07-09 19:11:27 +0000
committerJeff Law <law@gcc.gnu.org>2019-07-09 13:11:27 -0600
commit4faba5c3bc37c0bfceec6b254d76c5d0b3e2fe8b (patch)
tree0f006e571ca7dd5b2e173aa6d0e651ef24ab61e4 /gcc/simplify-rtx.c
parent99b1c316ec974a39bdd949f8559bb28861b69592 (diff)
downloadgcc-4faba5c3bc37c0bfceec6b254d76c5d0b3e2fe8b.zip
gcc-4faba5c3bc37c0bfceec6b254d76c5d0b3e2fe8b.tar.gz
gcc-4faba5c3bc37c0bfceec6b254d76c5d0b3e2fe8b.tar.bz2
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 <john@darrington.wattle.id.au> * 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
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index dd2acd4..4892c49 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 =