This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/49770] [4.7 Regression] wrong code with -fno-tree-forwprop


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49770

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-18 10:46:28 UTC ---
Ok, it's sth I worried about when doing the patch.  Namely:

      /* Make sure to use a valueized reference ...  */
      if (!ao_ref_init_from_vn_reference (&r, vr1.set, vr1.type, vr1.operands))
        ao_ref_init (&r, op);
      else
        /* ... but also preserve a full reference tree for advanced TBAA.  */
        r.ref = op;

preserving op as r.ref is playing foul of the aliasing code which assumes
that the base in r.ref is the one that corresponds to the r.base, r.offset
pair.  That is not the case when we valueized &MEM[&b]._M_finish into
MEM[D.1719_29]._M_cur.

Not doing the above loses some TBAA related disambiguations.

I'm thinking about a good solution.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]