public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vmakarov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/103676] [10/11/12 Regression] internal compiler error: in extract_constrain_insn, at recog.c:2671
Date: Mon, 17 Jan 2022 16:43:32 +0000	[thread overview]
Message-ID: <bug-103676-4-g6LvO2jy82@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103676-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #21 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #19)
> r10-3981-gf6ff841bc8dd87ce364deb217dc6d1ec5dc31de8 still doesn't ICE,
> r10-3984-g22060d0e575e7754eb1355763d22bbe37c3caa13 already ICEs.
> 
> I guess there is a disagreement between LRA and recog on how exactly they
> treat register constraints.
> "=lh" for TARGET_THUMB means LO_REGS or HI_REGS classes for the output, bet
> LRA sees that LO_REGS or HI_REGS is together GENERAL_REGS and picks a
> GENERAL_REGS
> (reg:DI 7 r7 [orig:119 tmp ] [119]).  But that one has one half in LO_REGS
> and another half in HI_REGS and so extract_constrain_insn ->
> constrain_operands
> doesn't consider it as matching.

Interesting case.  To find required (reload) register class, LRA (as also the
old reload pass) makes some union of register classes in one alternative which
contains all or part of the registers of the classes (in this case it is
general reg class).  The problem can be solved w/o fixing LRA (and reload pass)
by using

 asm volatile(
  "ldrd %Q[r], %R[r], %[p]\n"
  : [r]"=l,h"(tmp)
  : [p]"m,m"(*p64)
  : "memory"
 );

The problem can be solved in LRA by more complex representation of required reg
classes (still reload should have also such fix).  I guess it will complicate
LRA and reload code a lot.

We could also use more clear description of semantics of constraints currently
used by LRA/reload.  In this case we still need to output more meaningful error
for LRA/reload instead of just internal compiler error.

  parent reply	other threads:[~2022-01-17 16:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-12 22:32 [Bug target/103676] New: " patrick.oppenlander at gmail dot com
2021-12-12 23:31 ` [Bug target/103676] " pinskia at gcc dot gnu.org
2021-12-12 23:32 ` pinskia at gcc dot gnu.org
2021-12-12 23:54 ` patrick.oppenlander at gmail dot com
2021-12-12 23:58 ` patrick.oppenlander at gmail dot com
2021-12-13 22:56 ` patrick.oppenlander at gmail dot com
2021-12-13 23:06 ` pinskia at gcc dot gnu.org
2021-12-13 23:13 ` pinskia at gcc dot gnu.org
2021-12-14  0:48 ` patrick.oppenlander at gmail dot com
2021-12-14  0:48 ` patrick.oppenlander at gmail dot com
2021-12-14  0:51 ` pinskia at gcc dot gnu.org
2021-12-14  0:52 ` pinskia at gcc dot gnu.org
2021-12-14  1:16 ` patrick.oppenlander at gmail dot com
2021-12-14  1:17 ` patrick.oppenlander at gmail dot com
2021-12-14  1:48 ` pinskia at gcc dot gnu.org
2021-12-14  1:50 ` [Bug target/103676] [10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-12-14  2:07 ` pinskia at gcc dot gnu.org
2021-12-14  2:11 ` pinskia at gcc dot gnu.org
2021-12-14  2:15 ` pinskia at gcc dot gnu.org
2021-12-29 17:02 ` jakub at gcc dot gnu.org
2021-12-29 17:06 ` jakub at gcc dot gnu.org
2022-01-17 12:46 ` rguenth at gcc dot gnu.org
2022-01-17 16:43 ` vmakarov at gcc dot gnu.org [this message]
2022-01-17 17:00 ` jakub at gcc dot gnu.org
2022-01-18 13:38 ` vmakarov at gcc dot gnu.org
2022-01-21 18:37 ` cvs-commit at gcc dot gnu.org
2022-01-28 16:38 ` [Bug target/103676] [10/11 " jakub at gcc dot gnu.org
2022-06-28 10:47 ` jakub at gcc dot gnu.org
2023-07-07 10:41 ` [Bug target/103676] [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-103676-4-g6LvO2jy82@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).