This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix middle-end/64061, ICE in gen_rtx_SUBREG
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 1 Dec 2014 10:28:47 -0800
- Subject: Re: [PATCH] Fix middle-end/64061, ICE in gen_rtx_SUBREG
- Authentication-results: sourceware.org; auth=none
- References: <CA+=Sn1=zFAJVCCpTFkt5fKwcy0Wd3DyMVMt-XoUGE3q2JVNutA at mail dot gmail dot com> <CA+=Sn1mQyfpPbuMA7dZvifkqiGh85ejMA8yRAcMeH0RRdfa5kg at mail dot gmail dot com>
On Wed, Nov 26, 2014 at 2:01 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Wed, Nov 26, 2014 at 2:00 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> Hi,
>> The problem here is lra_substitute_pseudo calls gen_rtx_SUBREG with
>> a VOIDmode (const_int) argument but really it should not be calling
>> gen_rtx_SUBREG directly instead it should be using
>> gen_lowpart_if_possible. This patch fixes that and adds a testcase
>> that had happened on x86_64.
>
> I forgot to say I ran into this issue first on aarch64-linux-gnu while
> building libgo.
>
> Thanks,
> Andrew
>
>>
>> OK? I bootstrapped and tested this on both aarch64-linux-gnu and
>> x86_64-linux-gnu with no regression on either.
>>
>> Thanks,
>> Andrew Pinski
>>
>> ChangeLog:
>> * lra.c (lra_substitute_pseudo): Use gen_lowpart_if_possible
>> instead of gen_rtx_SUBREG/gen_lowpart_SUBREG.
>>
>> testsuite/ChangeLog:
>>
>> * gcc.dg/pr64061.c: New testcase.
Vladimir fixed it with a different patch:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=218171
--
H.J.