public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gjl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/116389] [avr][15 regression] ICE in extract_constrain_insn for avrtiny and -O2
Date: Sat, 17 Aug 2024 13:07:22 +0000	[thread overview]
Message-ID: <bug-116389-4-sdpHyG9Trw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-116389-4@http.gcc.gnu.org/bugzilla/>

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |law at gcc dot gnu.org
   Last reconfirmed|                            |2024-08-17
            Summary|ICE in                      |[avr][15 regression] ICE in
                   |extract_constrain_insn for  |extract_constrain_insn for
                   |avrtiny and -O2             |avrtiny and -O2
           Keywords|                            |ra
             Blocks|                            |56183
          Component|target                      |rtl-optimization

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
There is this insn from ext-dce (from -fdump-rtl-ira-details):

(insn 180 179 181 26 (set (reg/v:SI 70 [ __paddec ])
        (subreg:SI (reg/v:HI 78 [ __len ]) 0))
"/ssd1/build/avr/gcc-bug/avr/avrtiny/libstdc++-v3/include/bits/locale_facets_nonio.tcc":477:14
119 {*movsi_split}
     (nil))

Register allocation then assigns R30:HI to pseudo 78, but due to the
paradoxical subreg, this becomes R30:SI which is not a valid hard register
because R31 is the last valid general-purpose register.  The reload dump (from
-fdump-rtl-reload-details):

(insn 180 900 181 27 (set (mem/c:SI (plus:HI (reg/f:HI 28 r28)
                (const_int 28 [0x1c])) [91 %sfp+28 S4 A8])
        (reg:SI 30 r30))
"/ssd1/build/avr/gcc-bug/avr/avrtiny/libstdc++-v3/inclu

This insn is not valid because R30:SI is not a valid hard reg, so it's no
wonder no valid insn constraint alternative is found and hence ICE.

So the question is whether that paradoxical subreg from ext-dce is valid in the
first place? Or is it a register allocation issue?

As an aside, -mlra also ICEs because the code is too complicated for LRA
(doesn't find reloads.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56183
[Bug 56183] [meta-bug][avr] Problems with register allocation

  reply	other threads:[~2024-08-17 13:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16 11:16 [Bug c++/116389] New: " dv at vollmann dot ch
2024-08-17 13:07 ` gjl at gcc dot gnu.org [this message]
2024-08-17 15:07 ` [Bug rtl-optimization/116389] [avr][15 regression] " law at gcc dot gnu.org
2024-08-17 19:50 ` gjl at gcc dot gnu.org
2024-08-17 20:09 ` law at gcc dot gnu.org
2024-08-17 21:08 ` gjl at gcc dot gnu.org
2024-08-17 21:16 ` law at gcc dot gnu.org
2024-08-19 10:30 ` [Bug rtl-optimization/116389] [15 regression] [avr] ICE in extract_constrain_insn for avrtiny and -O2 with ext-dce gjl at gcc dot gnu.org
2024-08-19 14:56 ` rguenth at gcc dot gnu.org
2024-09-18  9:53 ` gjl 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-116389-4-sdpHyG9Trw@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).