diff mbox

Fix ICE with -fauto-profile when walking vdefs

Message ID CAFk3UF_e+653MEPr4YR=tdKX=969WnNHt+0640NCUUk-yT+EdA@mail.gmail.com
State New
Headers show

Commit Message

Sebastian Pop March 31, 2017, 9:30 p.m. UTC
On Fri, Mar 31, 2017 at 1:50 PM, Richard Biener <rguenther@suse.de> wrote:
> That looks like a workaround rather than the correct fix.  Who sets .MEM? It should assign the proper def.
>

Moving the auto_profile pass above several other passes fixes the problem.
The minimal change to fix the problem is by disabling these two passes:


It seems to me that early_vrp is the one changing the IR in an inconsistent way.

Comments

Richard Biener April 3, 2017, 10:24 a.m. UTC | #1
On Fri, 31 Mar 2017, Sebastian Pop wrote:

> On Fri, Mar 31, 2017 at 1:50 PM, Richard Biener <rguenther@suse.de> wrote:
> > That looks like a workaround rather than the correct fix.  Who sets .MEM? It should assign the proper def.
> >
> 
> Moving the auto_profile pass above several other passes fixes the problem.
> The minimal change to fix the problem is by disabling these two passes:
> 
> --- a/gcc/passes.def
> +++ b/gcc/passes.def
> @@ -86,14 +86,12 @@ along with GCC; see the file COPYING3.  If not see
>    NEXT_PASS (pass_ccp, false /* nonzero_p */);
>    /* After CCP we rewrite no longer addressed locals into SSA
>       form if possible.  */
> -  NEXT_PASS (pass_forwprop);
>            NEXT_PASS (pass_early_thread_jumps);
>    NEXT_PASS (pass_sra_early);
>    /* pass_build_ealias is a dummy pass that ensures that we
>       execute TODO_rebuild_alias at this point.  */
>    NEXT_PASS (pass_build_ealias);
>    NEXT_PASS (pass_fre);
> -  NEXT_PASS (pass_early_vrp);
>    NEXT_PASS (pass_merge_phi);
>            NEXT_PASS (pass_dse);
>    NEXT_PASS (pass_cd_dce);
> 
> It seems to me that early_vrp is the one changing the IR in an inconsistent way.

No, that would have bombed in verify_ssa.
diff mbox

Patch

--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -86,14 +86,12 @@  along with GCC; see the file COPYING3.  If not see
   NEXT_PASS (pass_ccp, false /* nonzero_p */);
   /* After CCP we rewrite no longer addressed locals into SSA
      form if possible.  */
-  NEXT_PASS (pass_forwprop);
           NEXT_PASS (pass_early_thread_jumps);
   NEXT_PASS (pass_sra_early);
   /* pass_build_ealias is a dummy pass that ensures that we
      execute TODO_rebuild_alias at this point.  */
   NEXT_PASS (pass_build_ealias);
   NEXT_PASS (pass_fre);
-  NEXT_PASS (pass_early_vrp);
   NEXT_PASS (pass_merge_phi);
           NEXT_PASS (pass_dse);
   NEXT_PASS (pass_cd_dce);