public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/112380] [14 regression] ICE when building Mesa (in combine, internal compiler error: in simplify_subreg) since r14-2526-g8911879415d6c2 Date: Mon, 11 Dec 2023 17:33:00 +0000 [thread overview] Message-ID: <bug-112380-4-7HqOTCKFRE@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-112380-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112380 --- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>: https://gcc.gnu.org/g:624e274ca3a4405a55662fa72d1163120df0e03d commit r14-6424-g624e274ca3a4405a55662fa72d1163120df0e03d Author: Roger Sayle <roger@nextmovesoftware.com> Date: Mon Dec 11 17:30:20 2023 +0000 PR rtl-optimization/112380: Defend against CLOBBERs in combine.cc This patch addresses PR rtl-optimization/112380, an ICE-on-valid regression where a (clobber (const_int 0)) encounters a sanity checking gcc_assert (at line 7554) in simplify-rtx.cc. These CLOBBERs are used internally by GCC's combine pass much like error_mark_node is used by various language front-ends. The solutions are either to handle/accept these CLOBBERs through-out (or in more places in) the middle-end's RTL optimizers, including functions in simplify-rtx.cc that are used by passes other than combine, and/or attempt to prevent these CLOBBERs escaping from try_combine into the RTX/RTL stream. The benefit of the second approach is that it actually allows for better optimization: when try_combine fails to simplify an expression instead of substituting a CLOBBER to avoid the instruction pattern being recognized, noticing the CLOBBER often allows combine to attempt alternate simplifications/transformations looking for those that can be recognized. This first alternative is the minimal fix to address the CLOBBER encountered in the bugzilla PR. 2023-12-11 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR rtl-optimization/112380 * combine.cc (expand_field_assignment): Check if gen_lowpart returned a CLOBBER, and avoid calling gen_simplify_binary with it if so. gcc/testsuite/ChangeLog PR rtl-optimization/112380 * gcc.dg/pr112380.c: New test case.
next prev parent reply other threads:[~2023-12-11 17:33 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-04 14:32 [Bug rtl-optimization/112380] New: [14 regression] ICE when building mesa sjames at gcc dot gnu.org 2023-11-04 14:32 ` [Bug rtl-optimization/112380] " sjames at gcc dot gnu.org 2023-11-04 15:45 ` sjames at gcc dot gnu.org 2023-11-04 15:57 ` sjames at gcc dot gnu.org 2023-11-04 17:01 ` pinskia at gcc dot gnu.org 2023-11-04 17:47 ` [Bug rtl-optimization/112380] [14 regression] ICE when building Mesa (in combine, internal compiler error: in simplify_subreg) sjames at gcc dot gnu.org 2023-11-04 18:02 ` pinskia at gcc dot gnu.org 2023-11-04 19:16 ` [Bug rtl-optimization/112380] [14 regression] ICE when building Mesa (in combine, internal compiler error: in simplify_subreg) since r14-4612-g6decda1a35be57 sjames at gcc dot gnu.org 2023-11-04 19:32 ` pinskia at gcc dot gnu.org 2023-11-04 19:40 ` pinskia at gcc dot gnu.org 2023-11-05 9:19 ` sjames at gcc dot gnu.org 2023-11-05 19:15 ` [Bug rtl-optimization/112380] [14 regression] ICE when building Mesa (in combine, internal compiler error: in simplify_subreg) since r14-2526-g8911879415d6c2 roger at nextmovesoftware dot com 2023-11-12 22:42 ` sjames at gcc dot gnu.org 2023-11-12 23:26 ` roger at nextmovesoftware dot com 2023-12-11 17:33 ` cvs-commit at gcc dot gnu.org [this message] 2023-12-16 9:25 ` roger at nextmovesoftware dot com
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-112380-4-7HqOTCKFRE@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: linkBe 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).