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  <ja...@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

Reply via email to