This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICEs in simplify_immed_subreg on OImode/XImode subregs (PR target/63910)
- From: Mike Stump <mikestump at comcast dot net>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>
- Date: Wed, 19 Nov 2014 14:23:47 -0800
- Subject: Re: [PATCH] Fix ICEs in simplify_immed_subreg on OImode/XImode subregs (PR target/63910)
- Authentication-results: sourceware.org; auth=none
- References: <20141118215235 dot GP1745 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1411190956070 dot 374 at zhemvz dot fhfr dot qr> <20141119114947 dot GD1745 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1411191257510 dot 374 at zhemvz dot fhfr dot qr> <20141119120743 dot GE1745 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1411191323060 dot 374 at zhemvz dot fhfr dot qr> <B085090A-2B61-47F3-9642-BD546F0CC08C at comcast dot net> <20141119215709 dot GM1745 at tucnak dot redhat dot com>
On Nov 19, 2014, at 1:57 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Though, following patch is just fine for me too, I don't think it will
> make a significant difference:
This version is fine by me.
> --- gcc/simplify-rtx.c 2014-11-19 15:39:24.073113107 +0100
> +++ gcc/simplify-rtx.c 2014-11-19 22:55:44.201464253 +0100
> @@ -5504,6 +5504,8 @@ simplify_immed_subreg (machine_mode oute
> 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 oute
> 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