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 target/113114] [14 Regression] ICE compiling gcc.c-torture/execute/pr59643.cwith -mabi=ilp32; in try_promote_writeback aarch64-ldp-fusion.cc
Date: Tue, 23 Jan 2024 10:58:37 +0000	[thread overview]
Message-ID: <bug-113114-4-I7SHHZLvRL@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113114-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 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:20e18106fac2d11ee43683291ff11d76da41d50b

commit r14-8353-g20e18106fac2d11ee43683291ff11d76da41d50b
Author: Alex Coplan <alex.coplan@arm.com>
Date:   Thu Jan 18 17:53:01 2024 +0000

    aarch64: Don't assert recog success in ldp/stp pass [PR113114]

    The PR shows two different cases where try_promote_writeback produces an
    RTL pattern which isn't recognized.  Currently this leads to an ICE, as
    we assert recog success, but I think it's better just to back out of the
    changes gracefully if recog fails (as we do in the main fuse_pair case).

    In theory since we check the ranges here recog shouldn't fail (which is
    why I had the assert in the first place), but the PR shows an edge case
    in the patterns where if we form a pre-writeback pair where the
    writeback offset is exactly -S, where S is the size in bytes of one
    transfer register, we fail to match the expected pattern as the patterns
    look explicitly for plus operands in the mems.  I think fixing this
    would require adding at least four new special-case patterns to
    aarch64.md for what doesn't seem to be a particularly useful variant of
    the insns.  Even if we were to do that, I think it would be GCC 15
    material, and it's better to just punt for GCC 14.

    The ILP32 case in the PR is a bit different, as that shows us trying to
    combine a pair with DImode base register operands in the mems together
    with an SImode trailing update of the base register.  This leads to us
    forming an RTL pattern which references the base register in both SImode
    and DImode, which also fails to recog.  Again, I think it's best just to
    take the missed optimization for now.  If we really want to make this
    (try_promote_writeback) work for ILP32, we can try to do it for GCC 15.

    gcc/ChangeLog:

            PR target/113114
            * config/aarch64/aarch64-ldp-fusion.cc (try_promote_writeback):
            Don't assert recog success, just punt if the writeback pair
            isn't recognized.

    gcc/testsuite/ChangeLog:

            PR target/113114
            * gcc.c-torture/compile/pr113114.c: New test.
            * gcc.target/aarch64/pr113114.c: New test.

  parent reply	other threads:[~2024-01-23 10:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22 13:52 [Bug target/113114] New: ICE " fkastl at suse dot cz
2023-12-22 16:59 ` [Bug target/113114] [14 Regression] ICE compiling gcc.c-torture/execute/pr59643.cwith -mabi=ilp32; " pinskia at gcc dot gnu.org
2024-01-02 14:45 ` acoplan at gcc dot gnu.org
2024-01-08 12:51 ` jakub at gcc dot gnu.org
2024-01-17 15:54 ` acoplan at gcc dot gnu.org
2024-01-17 15:57 ` acoplan at gcc dot gnu.org
2024-01-17 16:31 ` acoplan at gcc dot gnu.org
2024-01-18 16:32 ` acoplan at gcc dot gnu.org
2024-01-19 10:16 ` acoplan at gcc dot gnu.org
2024-01-19 14:03 ` acoplan at gcc dot gnu.org
2024-01-23 10:58 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-23 10:59 ` acoplan 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-113114-4-I7SHHZLvRL@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).