This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/40730] redundant memory load
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2009 09:50:47 -0000
- Subject: [Bug target/40730] redundant memory load
- References: <bug-40730-17659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-07-13 09:50 -------
-fgcse-las should do the trick. Note that PRE would do this kind of
optimization on the tree-level, but it is disabled with -Os (so is gcse).
<bb 2>:
D.1614_2 = p2_1(D)->front;
p1_3(D)->head = D.1614_2;
goto <bb 4>;
<bb 3>:
D.1616_8 = D.1615_4->next;
p1_3(D)->head = D.1616_8;
<bb 4>:
D.1615_4 = p1_3(D)->head;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40730