public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change
@ 2022-02-05 18:57 law at gcc dot gnu.org
  2022-02-07  7:51 ` [Bug rtl-optimization/104400] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2022-02-05 18:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104400
           Summary: [12 Regression] v850e lra/reload failure after recent
                    change
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at gcc dot gnu.org
  Target Milestone: ---

After this change:

commit 85419ac59724b7ce710ebb4acf03dbd747edeea3 (HEAD, refs/bisect/bad)
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Fri Jan 21 13:34:32 2022 -0500

    [PR103676] LRA: Calculate and exclude some start hard registers for reload
pseudos

    LRA and old reload pass uses only one register class for reload pseudos
even if
    operand constraints contain more one register class.  Let us consider
    constraint 'lh' for thumb arm which means low and high thumb registers.
    Reload pseudo for such constraint will have general reg class (union of
    low and high reg classes).  Assigning the last low register to the reload
    pseudo is wrong if the pseudo is of DImode as it requires two hard regs.
    But it is considered OK if we use general reg class.  The following patch
    solves this problem for LRA.

    gcc/ChangeLog:

            PR target/103676
[ ... ]

The v850e-elf port will no longer build newlib due to a spill failure.

I've narrowed the test down, but haven't done any debugging to see if this is
really an LRA issue or a backend issue.

Compile with -O2 -mv850e3v5 to trigger:
./cc1 -O2 -mv850e3v5 j.c
 frob
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> {heap 1200k} <visibility> {heap 1200k} <build_ssa_passes>
{heap 1200k} <opt_local_passes> {heap 1200k} <remove_symbols> {heap 1616k}
<targetclone> {heap 1616k} <free-fnsummary> {heap 1616k} <emutls> {heap
1616k}Streaming LTO
 <whole-program> {heap 1616k} <profile_estimate> {heap 1616k} <icf> {heap
1616k} <devirt> {heap 1616k} <cp> {heap 1616k} <sra> {heap 1616k} <fnsummary>
{heap 1616k} <inline> {heap 1616k} <pure-const> {heap 1616k} <modref> {heap
1616k} <free-fnsummary> {heap 1616k} <static-var> {heap 1616k} <single-use>
{heap 1616k} <comdats> {heap 1616k}Assembling functions:
 frob
j.c: In function 'frob':
j.c:7:1: error: unable to find a register to spill
    7 | }
      | ^
j.c:7:1: error: this is the insn:
(insn 22 26 25 2 (set (mem/c:DI (reg/f:SI 34 .fp) [1 %sfp+-8 S8 A32])
        (reg:DI 52)) "j.c":4:7 1 {*movdi_internal}
     (expr_list:REG_DEAD (reg:DI 52)
        (nil)))
during RTL pass: reload
j.c:7:1: internal compiler error: in lra_split_hard_reg_for, at
lra-assigns.cc:1837


double frob (double r)
{
    r = -r;
    return r;

}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/104400] [12 Regression] v850e lra/reload failure after recent change
  2022-02-05 18:57 [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change law at gcc dot gnu.org
@ 2022-02-07  7:51 ` rguenth at gcc dot gnu.org
  2022-02-09 14:47 ` vmakarov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-07  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
             Target|                            |v850e-elf
           Keywords|                            |ra

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/104400] [12 Regression] v850e lra/reload failure after recent change
  2022-02-05 18:57 [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change law at gcc dot gnu.org
  2022-02-07  7:51 ` [Bug rtl-optimization/104400] " rguenth at gcc dot gnu.org
@ 2022-02-09 14:47 ` vmakarov at gcc dot gnu.org
  2022-02-09 17:14 ` law at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2022-02-09 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Thank you for reporting this, Jeff.

I've reproduced the bug.  I hope to fix this on this week.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/104400] [12 Regression] v850e lra/reload failure after recent change
  2022-02-05 18:57 [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change law at gcc dot gnu.org
  2022-02-07  7:51 ` [Bug rtl-optimization/104400] " rguenth at gcc dot gnu.org
  2022-02-09 14:47 ` vmakarov at gcc dot gnu.org
@ 2022-02-09 17:14 ` law at gcc dot gnu.org
  2022-02-10 15:22 ` vmakarov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2022-02-09 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-02-09
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
NP on the timing.  My biggest concern (as always) is whether or not this is a
generic issue or a bug in the v850 target files.  The former is obviously much
more important.

If it starts to look like a target issue, then feel free to punt it to me. 
While I don't know the v850 fp bits, I have retained a fair amount of generic
v850 knowledge over the decades :-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/104400] [12 Regression] v850e lra/reload failure after recent change
  2022-02-05 18:57 [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change law at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-02-09 17:14 ` law at gcc dot gnu.org
@ 2022-02-10 15:22 ` vmakarov at gcc dot gnu.org
  2022-02-11 15:50 ` cvs-commit at gcc dot gnu.org
  2022-02-11 16:57 ` law at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2022-02-10 15:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #2)
> NP on the timing.  My biggest concern (as always) is whether or not this is
> a generic issue or a bug in the v850 target files.  The former is obviously
> much more important.
> 
> If it starts to look like a target issue, then feel free to punt it to me. 
> While I don't know the v850 fp bits, I have retained a fair amount of
> generic v850 knowledge over the decades :-)

It is my patch pitfall for very unusual v850 insn constraint 'e!r' where e is
even general reg and subset of r.

I have a patch to fix this and after testing it I'll commit it today or
tomorrow.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/104400] [12 Regression] v850e lra/reload failure after recent change
  2022-02-05 18:57 [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change law at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-02-10 15:22 ` vmakarov at gcc dot gnu.org
@ 2022-02-11 15:50 ` cvs-commit at gcc dot gnu.org
  2022-02-11 16:57 ` law at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-11 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Vladimir Makarov <vmakarov@gcc.gnu.org>:

https://gcc.gnu.org/g:274a4d29421e73c9b40c1641986c6ed904e20184

commit r12-7200-g274a4d29421e73c9b40c1641986c6ed904e20184
Author: Vladimir N. Makarov <vmakarov@redhat.com>
Date:   Fri Feb 11 09:52:14 2022 -0500

    [PR104400] LRA: Modify exclude start hard register calculation for insn
alternative

    v850 target has an interesting insn alternative constraint 'e!r' where e
    denotes even general regs and e is a subset of r.  We cannot just make
    union of exclude start hard registers for e and r and should use only
    exclude start hard registers of r.  The following patch implements this.

    gcc/ChangeLog:

            PR rtl-optimization/104400
            * lra-constraints.cc (process_alt_operands): Don't make union of
            this_alternative_exclude_start_hard_regs when reg class in insn
            alternative covers other reg classes in the same alternative.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/104400
            * gcc.target/v850/pr104400.c: New.
            * gcc.target/v850/v850.exp: New.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/104400] [12 Regression] v850e lra/reload failure after recent change
  2022-02-05 18:57 [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change law at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-02-11 15:50 ` cvs-commit at gcc dot gnu.org
@ 2022-02-11 16:57 ` law at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2022-02-11 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> ---
And I can confirm newlib builds again.  Unfortunately, the last successful
build was too far in the past and was wiped by Jenkins.  So I can't compare the
testsuite results with that prior successful run :(

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-11 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 18:57 [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change law at gcc dot gnu.org
2022-02-07  7:51 ` [Bug rtl-optimization/104400] " rguenth at gcc dot gnu.org
2022-02-09 14:47 ` vmakarov at gcc dot gnu.org
2022-02-09 17:14 ` law at gcc dot gnu.org
2022-02-10 15:22 ` vmakarov at gcc dot gnu.org
2022-02-11 15:50 ` cvs-commit at gcc dot gnu.org
2022-02-11 16:57 ` law at gcc dot gnu.org

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).