public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/113831] [11/12/13/14 Regression] Wrong VN with structurally identical ref since r9-398
Date: Mon, 12 Feb 2024 13:37:06 +0000	[thread overview]
Message-ID: <bug-113831-4-5LFxfrsnqX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113831-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:938a419182f8c43bd1212ffb98f8aa6077cf8326

commit r14-8929-g938a419182f8c43bd1212ffb98f8aa6077cf8326
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Feb 9 10:16:38 2024 +0100

    tree-optimization/113831 - wrong VN with structurally identical ref

    When we use get_ref_base_and_extent during VN and that ends up using
    global ranges to restrict the range of a ref we have to take care
    of not using the same expression in the hashtable as for a ref that
    could not use that global range.  The following attempts to ensure
    this by applying similar logic as get_ref_base_and_extent to
    copy_reference_ops_from_ref so they behave consistent.

            PR tree-optimization/113831
            PR tree-optimization/108355
            * tree-ssa-sccvn.cc (copy_reference_ops_from_ref): When
            we see variable array indices and get_ref_base_and_extent
            can resolve those to constants fix up the ops to constants
            as well.
            (ao_ref_init_from_vn_reference): Use 'off' member for
            ARRAY_REF and ARRAY_RANGE_REF instead of recomputing it.
            (valueize_refs_1): Also fixup 'off' of ARRAY_RANGE_REF.

            * gcc.dg/torture/pr113831.c: New testcase.
            * gcc.dg/tree-ssa/ssa-fre-104.c: Likewise.

  parent reply	other threads:[~2024-02-12 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 14:18 [Bug tree-optimization/113831] New: [11/12/13/14 Regression] Wrong VN with structurally identical ref since r9-398-g6b9fc1782effc67dd9f6def16207653d79647553 rguenth at gcc dot gnu.org
2024-02-08 14:18 ` [Bug tree-optimization/113831] " rguenth at gcc dot gnu.org
2024-02-08 14:19 ` rguenth at gcc dot gnu.org
2024-02-08 14:20 ` [Bug tree-optimization/113831] [11/12/13/14 Regression] Wrong VN with structurally identical ref since r9-398 jakub at gcc dot gnu.org
2024-02-08 14:25 ` rguenth at gcc dot gnu.org
2024-02-09  8:22 ` rguenth at gcc dot gnu.org
2024-02-12 13:37 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-12 13:37 ` [Bug tree-optimization/113831] [11/12/13 " rguenth at gcc dot gnu.org
2024-02-13 11:56 ` cvs-commit at gcc dot gnu.org
2024-02-28 14:03 ` cvs-commit at gcc dot gnu.org
2024-05-07  6:18 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113831-4-5LFxfrsnqX@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).