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/94052] Paradoxical subregs out of expand causes ICE with multi register modes at -O2 or higher
Date: Tue, 24 Mar 2020 15:09:29 +0000	[thread overview]
Message-ID: <bug-94052-4-vyzDUPon6c@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94052-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Tamar Christina
<tnfchris@gcc.gnu.org>:

https://gcc.gnu.org/g:0349bc70454e4de18d1cdf5eea0917646fdf79ae

commit r8-10139-g0349bc70454e4de18d1cdf5eea0917646fdf79ae
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Tue Mar 24 15:00:44 2020 +0000

    AArch64: Break apart paradoxical subregs for VSTRUCT writes (PR
target/94052)

    This works around an ICE in reload where from expand we get the following
RTL
    generated for VSTRUCT mode writes:

    (insn 446 354 445 2 (set (reg:CI 383)
     (subreg:CI (reg:V4SI 291) 0)) "small.i":146:22 3408 {*aarch64_movci}
     (nil))

    This sequence is trying to say two things:

    1) liveliness: It's trying to say that eventually the whole CI reg will be
                   written to. It does this by generating the paradoxical
subreg.
    2) write data: It's trying to in the same instruction also write the V4SI
mode
                   component at offset 0 in the CI reg.

    This patch fixes it by in the backend when we see such a paradoxical
    construction breaking it apart and issuing a clobber to correct the
liveliness
    information and then emitting a normal subreg write for the component that
the
    paradoxical subreg was trying to write to.

    Concretely we generate this:

    (insn 42 41 43 (clobber (reg/v:CI 122 [ diD.5226 ])) "small.i":121:23 -1
         (nil))

    (insn 43 42 44 (set (subreg:V4SI (reg/v:CI 122 [ diD.5226 ]) 0)
            (reg:V4SI 136)) "small.i":121:23 -1
         (nil))

    gcc/ChangeLog:

            PR target/94052
            * config/aarch64/aarch64-simd.md (mov<mode>): Remove paradoxical
            subregs of VSTRUCT modes.

    gcc/testsuite/ChangeLog:

            * g++.target/aarch64/aarch64.exp: New file.
            * g++.target/aarch64/pr94052.C: New test.

  parent reply	other threads:[~2020-03-24 15:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-94052-4@http.gcc.gnu.org/bugzilla/>
2020-03-21  8:53 ` cvs-commit at gcc dot gnu.org
2020-03-24 14:54 ` cvs-commit at gcc dot gnu.org
2020-03-24 15:09 ` cvs-commit at gcc dot gnu.org [this message]
2020-03-24 15:13 ` tnfchris 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-94052-4-vyzDUPon6c@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).