https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44462
Bug 44462 depends on bug 100434, which changed state.
Bug 100434 Summary: DSE fails to DSE aggregate LHS.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100434
What|Removed |Added
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44462
--- Comment #5 from Richard Biener ---
So we now (GCC 8+ at least) get
:
_1 = i_am_pure (5);
a_8 = _1 * 2;
i_am_pure (8);
return a_8;
after early DCE. This is because we now do FRE before the first DCE which
4.5 didn't have (4.8
--- Comment #3 from rguenther at suse dot de 2010-06-09 09:10 ---
Subject: Re: Redundant looping pure functions
whose return value is dead are not optimized out
On Tue, 8 Jun 2010, pinskia at gcc dot gnu dot org wrote:
--- Comment #2 from pinskia at gcc dot gnu dot org
--- Comment #4 from hubicka at ucw dot cz 2010-06-09 10:29 ---
Subject: Re: Redundant looping pure functions
whose return value is dead are not optimized out
Why do we remove register LHS in DCE again?
Because it reduces the amount of garbage produced by expand :).
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-06-08 08:49 ---
Hm? The return values are removed as part of first DCE pass.
bb 2:
D.2721_1 = i_am_pure (5);
D.2722_2 = i_am_pure (5);
a_3 = D.2721_1 + D.2722_2;
i_am_pure (8);
i_am_pure (8);
return a_3;
and FRE/PRE
--- Comment #2 from pinskia at gcc dot gnu dot org 2010-06-08 20:10 ---
Why do we remove register LHS in DCE again?
Because it reduces the amount of garbage produced by expand :).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44462