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

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Feb 25 09:07:08 2016
New Revision: 233693

URL: https://gcc.gnu.org/viewcvs?rev=233693&root=gcc&view=rev
Log:
2016-02-25  Richard Biener  <rguent...@suse.de>

        Backport from mainline
        2016-02-15  Richard Biener  <rguent...@suse.de>

        PR tree-optimization/69776
        * tree-ssa-sccvn.h (vn_reference_lookup): Adjust prototype.
        * tree-ssa-sccvn.c (vn_reference_lookup): Add parameter to
        indicate whether we can use TBAA to disambiguate against stores.
        Use alias-set zero if not.
        (visit_reference_op_store): Do not use TBAA when looking up
        redundant stores.
        * tree-ssa-pre.c (compute_avail): Use TBAA here.
        (eliminate_dom_walker::before_dom_children): But not when looking
        up redundant stores.

        * gcc.dg/torture/pr69776.c: New testcase.

        2016-02-16  Richard Biener  <rguent...@suse.de>

        PR tree-optimization/69776
        * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Get alias
        sets from caller.
        (indirect_refs_may_alias_p): Likewise.
        (refs_may_alias_p_1): Pass alias sets as from ao_ref.
        * tree-ssa-sccvn.c (vn_reference_lookup): Also adjust vr alias-set
        according to tbaa_p.
        * tree-ssa-dom.c (lookup_avail_expr): Add tbaa_p flag.
        (optimize_stmt): For redundant store discovery do not allow tbaa.

        * gcc.dg/torture/pr69776-2.c: New testcase.

Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69776-2.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69776.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/tree-ssa-alias.c
    branches/gcc-5-branch/gcc/tree-ssa-dom.c
    branches/gcc-5-branch/gcc/tree-ssa-pre.c
    branches/gcc-5-branch/gcc/tree-ssa-sccvn.c
    branches/gcc-5-branch/gcc/tree-ssa-sccvn.h

Reply via email to