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/101885] [10/11/12 Regression] wrong code at -O3 on x86_64-linux-gnu
Date: Fri, 04 Feb 2022 09:38:31 +0000	[thread overview]
Message-ID: <bug-101885-4-GHqVLzr8tO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101885-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:

https://gcc.gnu.org/g:49365d511ac9b64009b1de11ef8a941f59407f67

commit r12-7046-g49365d511ac9b64009b1de11ef8a941f59407f67
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Fri Feb 4 09:32:21 2022 +0000

    [PATCH] PR rtl-optimization/101885: Prevent combine from clobbering flags

    This patch addresses PR rtl-optimization/101885 which is a P2 wrong code
    regression.  In combine, if the resulting fused instruction is a parallel
    of two sets which fails to be recognized by the backend, combine tries to
    emit these as two sequential set instructions (known as split_i2i3).
    As each set is recognized the backend may add any necessary "clobbers".
    The code currently checks that any clobbers added to the first "set"
    don't interfere with the second set, but doesn't currently handle the
    case that clobbers added to the second set may interfere/kill the
    destination of the first set (which must be live at this point).
    The solution is to cut'n'paste the "clobber" logic from just a few
    lines earlier, suitably adjusted for the second instruction.

    One minor nit that may confuse a reviewer is that at this point in
    the code we've lost track of which set was first and which was second
    (combine chooses dynamically, and the recog processes that adds the
    clobbers may have obfuscated the original SET_DEST) so the actual test
    below is to confirm that any newly added clobbers (on the second set
    instruction) don't overlap either set0's or set1's destination.

    2022-02-04  Roger Sayle  <roger@nextmovesoftware.com>

    gcc/ChangeLog
            PR rtl-optimization/101885
            * combine.cc (try_combine): When splitting a parallel into two
            sequential sets, check not only that the first doesn't clobber
            the second but also that the second doesn't clobber the first.

    gcc/testsuite/ChangeLog
            PR rtl-optimization/101885
            * gcc.dg/pr101885.c: New test case.

  parent reply	other threads:[~2022-02-04  9:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 17:09 [Bug tree-optimization/101885] New: " qrzhang at gatech dot edu
2021-08-12 17:10 ` [Bug tree-optimization/101885] " qrzhang at gatech dot edu
2021-08-12 21:06 ` [Bug rtl-optimization/101885] [10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-08-12 21:22 ` pinskia at gcc dot gnu.org
2021-08-12 21:23 ` pinskia at gcc dot gnu.org
2021-08-16  7:34 ` rguenth at gcc dot gnu.org
2022-01-20 15:29 ` jakub at gcc dot gnu.org
2022-01-20 15:40 ` jakub at gcc dot gnu.org
2022-01-20 16:55 ` jakub at gcc dot gnu.org
2022-01-20 17:15 ` jakub at gcc dot gnu.org
2022-01-20 17:27 ` jakub at gcc dot gnu.org
2022-01-20 17:29 ` jakub at gcc dot gnu.org
2022-01-20 18:00 ` jakub at gcc dot gnu.org
2022-02-03 11:07 ` roger at nextmovesoftware dot com
2022-02-04  1:03 ` segher at gcc dot gnu.org
2022-02-04  9:38 ` cvs-commit at gcc dot gnu.org [this message]
2022-02-10 22:26 ` [Bug rtl-optimization/101885] [10/11 " roger at nextmovesoftware dot com
2022-03-16  7:37 ` roger at nextmovesoftware dot com
2022-03-16  8:10 ` rguenth at gcc dot gnu.org
2022-06-28 10:46 ` jakub at gcc dot gnu.org
2023-07-07 10:40 ` [Bug rtl-optimization/101885] [11 " rguenth 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-101885-4-GHqVLzr8tO@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).