This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>, Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Dec 2018 16:28:10 -0700
- Subject: Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)
- References: <20181213225303.GB12380@tucnak>
On 12/13/18 3:53 PM, Jakub Jelinek wrote:
> Hi!
>
> The following testcase ICEs, because we have an indirect jump with
> a single (fake) successor edge to EXIT, one reachable from the body
> of the function after prologue and another one reachable from before the
> prologue (due to shrink-wrapping).
>
> The patch fixes this by disallowing crossjumping of basic blocks ending in
> such indirect jumps with no (non-fake) successors.
>
> That condition hits on the following testcases (never during bootstrap):
> gcc/testsuite/gcc.c-torture/compile/20050122-2.c
> gcc/testsuite/gcc.c-torture/execute/920428-2.c
> gcc/testsuite/gcc.c-torture/execute/pr24135.c
> gcc/testsuite/gcc.dg/pr49994-1.c
> gcc/testsuite/gcc.dg/pr79494.c
> gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c
> gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c
> gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c
> gcc/testsuite/gcc.target/i386/pr88470.c
> libgomp/testsuite/libgomp.c/pr81687-2.c
> where in most of them it is a non-local jump ending the bb; in a few of
> those testcases there is a crossjumping possibility, but it seems it
> is actually already handled during PRE (e.g. on pr24135.c).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2018-12-13 Jakub Jelinek <jakub@redhat.com>
>
> PR rtl-optimization/88470
> * cfgcleanup.c (outgoing_edges_match): If the function is
> shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
> edge to EXIT, return false.
>
> * gcc.target/i386/pr88470.c: New test.
OK. Are you planning to check the other ICEs in
maybe_record_trace_start that are in BZ to see if any are addressed by
this change?
jeff