This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix debug ICE on aarch64 due to bad rtl simplification (PR debug/70628)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]