[Bug tree-optimization/84958] int loads not eliminated against larger stores

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 15 08:27:34 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84958

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> [ FWIW, adding an extra fre pass here also results in optimal gimple:
> ...
> diff --git a/gcc/passes.def b/gcc/passes.def
> index 3ebcfc30349..6b64f600c4a 100644
> --- a/gcc/passes.def
> +++ b/gcc/passes.def
> @@ -325,6 +325,7 @@ along with GCC; see the file COPYING3.  If not see
>        NEXT_PASS (pass_tracer);
>        NEXT_PASS (pass_thread_jumps);
>        NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */);
> +      NEXT_PASS (pass_fre);
>        NEXT_PASS (pass_strlen);
>        NEXT_PASS (pass_thread_jumps);
>        NEXT_PASS (pass_vrp, false /* warn_array_bounds_p */);
> ...
> ]

which was added in:
...
commit 744fd446c321f78f9a1ce4ef5f83df8dcfa44a9e
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jul 1 07:54:38 2019 +0000

    tree-ssa-sccvn.c (class pass_fre): Add may_iterate pass parameter.

    2019-07-01  Richard Biener  <rguenther@suse.de>

            * tree-ssa-sccvn.c (class pass_fre): Add may_iterate
            pass parameter.
            (pass_fre::execute): Honor it.
            * passes.def: Adjust pass_fre invocations to allow iterating,
            add non-iterating pass_fre before late threading/dom.

            * gcc.dg/tree-ssa/pr77445-2.c: Adjust.

    From-SVN: r272843

diff --git a/gcc/passes.def b/gcc/passes.def
index ad2efabd385..9a5b0cd554a 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -312,6 +312,7 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_strength_reduction);
       NEXT_PASS (pass_split_paths);
       NEXT_PASS (pass_tracer);
+      NEXT_PASS (pass_fre, false /* may_iterate */);
       NEXT_PASS (pass_thread_jumps);
       NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */);
       NEXT_PASS (pass_strlen);
...


More information about the Gcc-bugs mailing list