From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 999D73858003; Wed, 3 Nov 2021 13:51:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 999D73858003 From: "macro at orcam dot me.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/103059] New: [10 regression][VAX] ICE in postreload with the ASHIFT form of scaled indexed addressing Date: Wed, 03 Nov 2021 13:51:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: macro at orcam dot me.uk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: macro at orcam dot me.uk 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 cf_gcctarget 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: Wed, 03 Nov 2021 13:51:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103059 Bug ID: 103059 Summary: [10 regression][VAX] ICE in postreload with the ASHIFT form of scaled indexed addressing Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: macro at orcam dot me.uk Reporter: macro at orcam dot me.uk Target Milestone: --- Target: vax-netbsdelf We have a `vax-netbsdelf' target regression ultimately caused by commit c605a8bf9270 ("VAX: Accept ASHIFT in address expressions") (needed for LRA) and as of commit 4a960d548b7d ("Avoid invalid loop transformations in jump threading registry.") causing a build error in libgcc: .../libgcc/libgcov-driver.c: In function 'gcov_do_dump': .../libgcc/libgcov-driver.c:686:1: error: insn does not satisfy its constraints: 686 | } | ^ (insn 2051 2050 2052 185 (set (reg/f:SI 0 %r0 [555]) (plus:SI (ashift:SI (mem/c:SI (plus:SI (reg/f:SI 13 %fp) (const_int -28 [0xffffffffffffffe4])) [40 %sfp+-28 = S4 A32]) (const_int 3 [0x3])) (plus:SI (reg/v/f:SI 9 %r9 [orig:176 fn_buffer ] [176]) (const_int 24 [0x18])))) ".../libgcc/libgcov-driver.c":172:= 40 614 {movaddrdi} (nil)) during RTL pass: postreload .../libgcc/libgcov-driver.c:686:1: internal compiler error: in extract_constrain_insn, at recog.c:2670 0x1122a5ff _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) .../gcc/rtl-error.c:108 0x1122a697 _fatal_insn_not_found(rtx_def const*, char const*, int, char con= st*) .../gcc/rtl-error.c:118 0x111b5f2f extract_constrain_insn(rtx_insn*) .../gcc/recog.c:2670 0x11143eef reload_cse_simplify_operands .../gcc/postreload.c:407 0x11142fdb reload_cse_simplify .../gcc/postreload.c:132 0x11143533 reload_cse_regs_1 .../gcc/postreload.c:238 0x11142ce7 reload_cse_regs .../gcc/postreload.c:66 0x1114af33 execute .../gcc/postreload.c:2355 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. This is because reload does not recognize the ASHIFT form of scaled=20 indexed addressing that the offending commit enabled the backend to=20 produce, and as seen in the RTL above lets the pseudo holding the=20 index part become the original memory reference rather than reloading it=20 into a hard register. Cf. ,=20 and commit 6b3034eaba83 ("lra: Canonicalize mult to shift in address=20 reloads"). Bug filed for tracking purposes, posting a fix right away.=