[Bug middle-end/82918] No aliasing is possible on non equal pointers

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 23 11:44:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82918

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Probably fixed by r255093

2017-11-23  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/23094
        * tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
        come here from walking over backedges in the first iteration.
        (vn_reference_lookup_3): Skip clobbers that store the same value.

        * gcc.dg/tree-ssa/ssa-fre-61.c: New testcase.

because we now see that we at most store the same value to value.data[0].

  _1 = value2_6(D)->data[0];
  value_5(D)->data[0] = _1;
  _2 = value2_6(D)->data[0];

But the handling is quite simplistic so

    value.data[0] = value2.data[0]+1;
    value.data[1] = value2.data[0]+1;
    value.data[2] = value2.data[0]+1;

isn't handled.  We also do not walk which is why the swapped case isn't
handled either.


More information about the Gcc-bugs mailing list