https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41486
Andrew Pinski changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
--- Comment #4 from matz at gcc dot gnu dot org 2009-09-28 12:08 ---
tree-ssa-sink doesn't sink anything with vuses in it, and if that weren't the
case then not any global store. And it isn't totally trivial to make it sink
that. It also doesn't move stuff into the post-dominator (not
--- Comment #3 from rguenth at gcc dot gnu dot org 2009-09-28 11:45 ---
The remaining cases should be
*p = a_1;
...
if (...)
*p = b_2;
where sinking the first store is possible and profitable (it's partially dead)
...
if (...)
*p = b_2;
else
*p = a_1;
which is
--- Comment #2 from rguenth at gcc dot gnu dot org 2009-09-28 11:07 ---
Confirmed.
Instead of doing a dominator walk to find non-trapping stores the pass
could be restructured to walk the use-def chain of .MEMs and look for
kills unless intervening clobbers (or PHI nodes) occur.
--
--- Comment #1 from chrbr at gcc dot gnu dot org 2009-09-28 10:53 ---
Created an attachment (id=18665)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18665&action=view)
case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41486