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 rtl-optimization/114924] [11/12/13/14/15 Regression] Wrong update of MEM_EXPR by RTL loop unrolling since r11-2963-gd6a05b494b4b71
Date: Fri, 03 May 2024 08:24:34 +0000	[thread overview]
Message-ID: <bug-114924-4-lc0u8Eoq08@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114924-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alex Coplan <acoplan@gcc.gnu.org>:

https://gcc.gnu.org/g:fe40d525619eee9c2821126390df75068df4773a

commit r15-126-gfe40d525619eee9c2821126390df75068df4773a
Author: Alex Coplan <alex.coplan@arm.com>
Date:   Fri May 3 09:23:59 2024 +0100

    cfgrtl: Fix MEM_EXPR update in duplicate_insn_chain [PR114924]

    The PR shows that when cfgrtl.cc:duplicate_insn_chain attempts to
    update the MR_DEPENDENCE_CLIQUE information for a MEM_EXPR we can end up
    accidentally dropping (e.g.) an ARRAY_REF from the MEM_EXPR and end up
    replacing it with the underlying MEM_REF.  This leads to an
    inconsistency in the MEM_EXPR information, and could lead to wrong code.

    While the walk down to the MEM_REF is necessary to update
    MR_DEPENDENCE_CLIQUE, we should use the outer tree expression for the
    MEM_EXPR.  This patch does that.

    gcc/ChangeLog:

            PR rtl-optimization/114924
            * cfgrtl.cc (duplicate_insn_chain): When updating MEM_EXPRs,
            don't strip (e.g.) ARRAY_REFs from the final MEM_EXPR.

  parent reply	other threads:[~2024-05-03  8:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 13:07 [Bug rtl-optimization/114924] New: " acoplan at gcc dot gnu.org
2024-05-02 13:15 ` [Bug rtl-optimization/114924] " acoplan at gcc dot gnu.org
2024-05-03  6:18 ` rguenth at gcc dot gnu.org
2024-05-03  8:24 ` cvs-commit at gcc dot gnu.org [this message]
2024-05-03 12:48 ` [Bug rtl-optimization/114924] [11/12/13/14 " cvs-commit at gcc dot gnu.org
2024-05-08 13:38 ` [Bug rtl-optimization/114924] [11/12/13 " cvs-commit at gcc dot gnu.org
2024-06-12 12:34 ` [Bug rtl-optimization/114924] [11/12 " 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-114924-4-lc0u8Eoq08@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).