From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 222E8385627B; Sun, 24 Jul 2022 11:24:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 222E8385627B From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106303] [13 Regression] ICE on valid code at -O3 with -fno-inline-small-functions on x86_64-linux-gnu: in extract_insn, at recog.cc:2791 since r13-1607-gc3ed9e0d6e96d869 Date: Sun, 24 Jul 2022 11:24:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: roger at nextmovesoftware dot com X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Sun, 24 Jul 2022 11:24:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106303 --- Comment #9 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:76d6224b944e1a66bfb1195fb7d35d9726f1aed8 commit r13-1811-g76d6224b944e1a66bfb1195fb7d35d9726f1aed8 Author: Roger Sayle Date: Sun Jul 24 12:22:22 2022 +0100 PR target/106303: Fix TImode STV related failures on x86. This patch resolves PR target/106303 (and the related PRs 106347, 106404, 106407) which are ICEs caused by my improvements to x86_64's 128-bit TImode to V1TImode Scalar to Vector (STV) pass. My apologies for the breakage. The issue is that data flow analysis is used to partition usage of each TImode pseudo into "chains", where each chain is analyzed and if suitable converted to vector operations. The problems appears when some chains for a pseudo are converted, and others aren't as RTL sharing can result in some mode changes leaking into other instructions that aren't/shouldn't/can't be converted, which eventually leads to an ICE for mismatched modes. My first approach to a fix was to unify more of the STV infrastructure, reasoning that if TImode STV was exhibiting these problems, but DImode and SImode STV weren't, the issue was likely to be caused/resolved by these remaining differences. This appeared to fix some but not all of the reported PRs. A better solution was then proposed by H.J. Lu in Bugzilla, that we need to iterate the removal of candidates in the function timode_remove_non_convertible_regs until there are no further changes. As each chain is removed from consideration, it in turn may affect whether other insns/chains can safely be converted. 2022-07-24 Roger Sayle H.J. Lu gcc/ChangeLog PR target/106303 PR target/106347 * config/i386/i386-features.cc (make_vector_copies): Move from general_scalar_chain to scalar_chain. (convert_reg): Likewise. (convert_insn_common): New scalar_chain method split out from general_scalar_chain convert_insn. (convert_registers): Move from general_scalar_chain to scalar_chain. (scalar_chain::convert): Call convert_insn_common before calling convert_insn. (timode_remove_non_convertible_regs): Iterate until there are no further changes to the candidates. * config/i386/i386-features.h (scalar_chain::hash_map): Move from general_scalar_chain. (scalar_chain::convert_reg): Likewise. (scalar_chain::convert_insn_common): New shared method. (scalar_chain::make_vector_copies): Move from general_scalar_ch= ain. (scalar_chain::convert_registers): Likewise. No longer virtual. (general_scalar_chain::hash_map): Delete. Moved to scalar_chai= n. (general_scalar_chain::convert_reg): Likewise. (general_scalar_chain::make_vector_copies): Likewise. (general_scalar_chain::convert_registers): Delete virtual metho= d. (timode_scalar_chain::convert_registers): Likewise. gcc/testsuite/ChangeLog PR target/106303 PR target/106347 * gcc.target/i386/pr106303.c: New test case. * gcc.target/i386/pr106347.c: New test case.=