This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33344] if(!z) {a.b = x->b + 1; z = &a; } else if (!x) { a.b = z->b+1; x = &a; } use z->b and x->b; is not optimized
- 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: 8 Sep 2007 13:00:11 -0000
- Subject: [Bug tree-optimization/33344] if(!z) {a.b = x->b + 1; z = &a; } else if (!x) { a.b = z->b+1; x = &a; } use z->b and x->b; is not optimized
- References: <bug-33344-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-09-08 13:00 -------
It's currently not optimized because the simple phiprop does neither handle
component references nor inserts loads from pointers.
See the thread starting at
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01075.html
on how to teach PRE to do a small set of possible transformations like this.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-09-08 13:00:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33344