This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/46763] gcc 4.5: missed optimization: copy global to local, prefetch
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Mar 2011 11:33:00 +0000
- Subject: [Bug tree-optimization/46763] gcc 4.5: missed optimization: copy global to local, prefetch
- Auto-submitted: auto-generated
- References: <bug-46763-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46763
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matz at gcc dot gnu.org
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-15 11:32:49 UTC ---
store sinking now works and exposes an if-conversion possibility:
<bb 5>:
g.1_6 = i_19 + 1;
g = g.1_6;
i_7 = bar (i_16);
g = i_7;
goto <bb 7>;
<bb 6>:
g = i_16;
<bb 7>:
# i_5 = PHI <i_7(5), i_16(6)>
the stores to g can be if-converted by re-using the existing PHI like so:
<bb 5>:
g.1_6 = i_19 + 1;
g = g.1_6;
i_7 = bar (i_16);
goto <bb 7>;
<bb 6>:
;
<bb 7>:
# i_5 = PHI <i_7(5), i_16(6)>
g = i_5;
that eventually fits into the cs_elim framework, but cs_elim runs
too early - Micha, do you remember why it runs where it runs?