* [PATCH] simplify-rtx.c (simplify_unary_operation_1): Change BITSIZE to PRECISION.
[not found] <20190708071108.773-1-john@darrington.wattle.id.au>
@ 2019-07-08 7:26 ` John Darrington
2019-07-09 19:22 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: John Darrington @ 2019-07-08 7:26 UTC (permalink / raw)
To: gcc-patches; +Cc: John Darrington
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 <john@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 <jakub@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
^ permalink raw reply [flat|nested] 2+ messages in thread