This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] combine: Fix PR80233
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Segher Boessenkool <segher at kernel dot crashing dot org>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Mar 2017 22:44:25 +0200
- Subject: Re: [PATCH] combine: Fix PR80233
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 07F2461BA5
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 07F2461BA5
- References: <e7b9da8d80a76e24b3a27144a8f32f7e4a725fee.1490811436.git.segher@kernel.crashing.org> <a8f32295-e5dd-3706-590e-873292092911@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Mar 29, 2017 at 02:35:32PM -0600, Jeff Law wrote:
> On 03/29/2017 12:23 PM, Segher Boessenkool wrote:
> > If combine has added an unconditional trap there will be a new basic
> > block as well. It will then end up considering the NOTE_INSN_BASIC_BLOCK
> > as the last_combined_insn, but then it tries to take the DF_INSN_LUID
> > of that and that dereferences a NULL pointer (since such a note is not
> > an INSN_P).
> >
> > This fixes it by not taking non-insns as last_combined_insn.
> >
> > Bootstrapped and tested on powerpc64-linux {-m32,-m64}.
> >
> >
> > Segher
> >
> >
> > 2017-03-29 Segher Boessenkool <segher@kernel.crashing.org>
> >
> > PR rtl-optimization/80233
> > * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
> > as last_combined_insn. Do not test for BARRIER_P separately.
> >
> > gcc/testsuite/
> > PR rtl-optimization/80233
> > * gcc.c-torture/compile/pr80233.c: New testcase.
> No strong opinions on this vs Jakub's patch. I guess yours may walk more
> objects on the chain, but in doing so is more likely to find a useful
> LAST_COMBINED_INSN. Jakub's stops earlier, but is less likely to have
> stopped on something useful.
>
> Your call Segher.
I like Segher's latest patch. But it is his call anyway ;)
Jakub