This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix debug ICE on aarch64 due to bad rtl simplification (PR debug/70628)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Bernd Schmidt <bschmidt at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Andrew Pinski <pinskia at gmail dot com>, Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>
- Date: Tue, 12 Apr 2016 12:11:39 -0700
- Subject: Re: [PATCH] Fix debug ICE on aarch64 due to bad rtl simplification (PR debug/70628)
- Authentication-results: sourceware.org; auth=none
- References: <20160412151011 dot GW19207 at tucnak dot redhat dot com>
On Tue, Apr 12, 2016 at 8:10 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> Most of simplify-rtx.c attempts hard not to generate any extra instructions,
> just simplify the RTL to something equivalent and let the user try to
> recognize it, or whatever else it wishes.
> This is especially important post-reload, when we can't create new pseudos,
> or e.g. when processing (simplifying) DEBUG_INSNs, where we certainly don't
> want any code around it (not to mention where exactly would it be emitted
> anyway?). E.g. it uses the gen_lowpart_no_emit rtl hook instead of
> gen_lowpart, etc.
> As the following testcase shows, there are two exceptions, for
> POINTER_EXTEND* targets under some very limited conditions it actually
> calls convert_memory_address, which sometimes does what simplify-rtx.c
> normally does, just return equivalent RTL expression, but in another case
> can create a new pseudo (no no after reload, or for debug insns any time)
> and emit some move insns.
>
> This patch arranges for a new argument to
> convert_memory_address_addr_space_1 and calls it with that new argument set
> to true, to make sure it never emits instructions or creates pseudos.
>
> Compared to the previous version of the patch, I've added ATTRIBUTE_UNUSED
> to the new argument, so that bootstrap doesn't fail on targets that don't
> define POINTERS_EXTEND*.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, bootstrapped on
> aarch64-linux (regtest pending).
> I don't have access to aarch64 ilp32 setup though, Andrew or anybody else,
> could you please test it there? Also CCing H.J. just in case it affects
> x86 -mx32.
>
I bootstrapped and tested it on x32. There is no regression.
--
H.J.