public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/97807] ICE in output_move_double, at config/arm/arm.c:19689
Date: Tue, 17 Aug 2021 18:07:13 +0000	[thread overview]
Message-ID: <bug-97807-4-N85XW3w4V9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97807-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
In Arm mode the compiler restricts 64-bit sized objects to be even/odd pairs of
core registers (ie starting in r0, r2, etc).  However, the ABI for this packed
object is trying to use (r1,r2) for passing the parameter and thus the compiler
generates

(set (reg:DF r1) (mem:DF(ptr)))

during expand.  This is already wrong, but not disastrous, since the compiler
could split this operation later on.  But a later pass turns the (mem:DF (ptr))
into a pre-inc because there's an earlier increment of the address.  We then
hit the assert during output because we can't handle the post-inc and splitting
the load into separate word operations.

There's multiple places where it might be argued this is going wrong:
- during expand (gen_movdi) when we should be splitting the operation into
parts for this case
- during auto-inc when the modified auto-inc pattern is not being correctly
validated
- during register allocation when the register allocation is not being checked
correctly.

I suspect the problem really is in the first of these - at least until we can
show that later passes don't merge things together again without validation.

  parent reply	other threads:[~2021-08-17 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12  8:42 [Bug target/97807] New: " marxin at gcc dot gnu.org
2020-11-12  8:42 ` [Bug target/97807] " marxin at gcc dot gnu.org
2021-08-17  9:57 ` marxin at gcc dot gnu.org
2021-08-17 18:07 ` rearnsha at gcc dot gnu.org [this message]
2023-08-23 17:36 ` jamborm at gcc dot gnu.org
2023-08-24 13:09 ` rearnsha 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-97807-4-N85XW3w4V9@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).