diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-11-21 10:23:26 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-11-21 10:23:26 +0100 |
commit | 0daaf8aa4d32fee71136021003bca60cc350a04e (patch) | |
tree | c141776a8a4f214038516aab8ddb8c6373b349c0 /gcc/simplify-rtx.c | |
parent | ccfe424ac5205471ceb888b31d2fa4b74c54640f (diff) | |
download | gcc-0daaf8aa4d32fee71136021003bca60cc350a04e.zip gcc-0daaf8aa4d32fee71136021003bca60cc350a04e.tar.gz gcc-0daaf8aa4d32fee71136021003bca60cc350a04e.tar.bz2 |
re PR target/63910 (ICE: simplify_immed_subreg, at simplify-rtx.c:5519 with -mstringop-strategy=vector_loop -mavx512f)
PR target/63910
* simplify-rtx.c (simplify_immed_subreg): Return NULL for integer
modes wider than MAX_BITSIZE_MODE_ANY_INT. If not using
CONST_WIDE_INT, make sure r fits into CONST_DOUBLE.
* gcc.target/i386/pr63910.c: New test.
From-SVN: r217908
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 022e36f..98d4ceb 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -5504,6 +5504,8 @@ simplify_immed_subreg (machine_mode outermode, rtx op, HOST_WIDE_INT tmp[MAX_BITSIZE_MODE_ANY_INT / HOST_BITS_PER_WIDE_INT]; wide_int r; + if (GET_MODE_PRECISION (outer_submode) > MAX_BITSIZE_MODE_ANY_INT) + return NULL_RTX; for (u = 0; u < units; u++) { unsigned HOST_WIDE_INT buf = 0; @@ -5515,10 +5517,13 @@ simplify_immed_subreg (machine_mode outermode, rtx op, tmp[u] = buf; base += HOST_BITS_PER_WIDE_INT; } - gcc_assert (GET_MODE_PRECISION (outer_submode) - <= MAX_BITSIZE_MODE_ANY_INT); r = wide_int::from_array (tmp, units, GET_MODE_PRECISION (outer_submode)); +#if TARGET_SUPPORTS_WIDE_INT == 0 + /* Make sure r will fit into CONST_INT or CONST_DOUBLE. */ + if (wi::min_precision (r, SIGNED) > HOST_BITS_PER_DOUBLE_INT) + return NULL_RTX; +#endif elems[elem] = immed_wide_int_const (r, outer_submode); } break; |