From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 99DBA3858423; Sat, 5 Feb 2022 18:57:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99DBA3858423 From: "law at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104400] New: [12 Regression] v850e lra/reload failure after recent change Date: Sat, 05 Feb 2022 18:57:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: law at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2022 18:57:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104400 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 Date: Fri Jan 21 13:34:32 2022 -0500 [PR103676] LRA: Calculate and exclude some start hard registers for rel= oad 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 relo= ad 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 pat= ch 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} {heap 1200k} {heap 1200k} {heap 1200k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k}Streaming LTO {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {heap 1616k} {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 =3D -r; return r; }=