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/108681] [13 Regression] gcc hangs compiling opencv/channels_combine.cpp for aarch64 Date: Mon, 13 Feb 2023 21:14:13 +0000 [thread overview] Message-ID: <bug-108681-4-RWfZU1QHuu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108681-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108681 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>: https://gcc.gnu.org/g:3cac06d84f334705ed0bce12fbc3a4cec4a8fd3b commit r13-5972-g3cac06d84f334705ed0bce12fbc3a4cec4a8fd3b Author: Richard Sandiford <richard.sandiford@arm.com> Date: Mon Feb 13 21:13:59 2023 +0000 lra: Replace subregs in bare uses & clobbers [PR108681] In this PR we had a write to one vector of a 4-vector tuple. The vector had mode V1DI, and the target doesn't provide V1DI moves, so this was converted into: (clobber (subreg:V1DI (reg/v:V4x1DI 92 [ b ]) 24)) followed by a DImode move. (The clobber isn't really necessary or helpful for a single word, but would be for wider moves.) The subreg in the clobber survived until after RA: (clobber (subreg:V1DI (reg/v:V4x1DI 34 v2 [orig:92 b ] [92]) 24)) IMO this isn't well-formed. If a subreg of a hard register simplifies to a hard register, it should be replaced by the hard register. If the subreg doesn't simplify, then target-independent code can't be sure which parts of the register are affected and which aren't. A clobber of such a subreg isn't useful and (again IMO) should just be removed. Conversely, a use of such a subreg is effectively a use of the whole inner register. LRA has code to simplify subregs of hard registers, but it didn't handle bare uses and clobbers. The patch extends it to do that. One question was whether the final_p argument to alter_subregs should be true or false. True is IMO dangerous, since it forces replacements that might not be valid from a dataflow perspective, and uses and clobbers only exist for dataflow. As said above, I think the correct way of handling a failed simplification would be to delete clobbers and replace uses of subregs with uses of the inner register. But I didn't want to write untested code to do that. In the PR, the clobber caused an infinite loop in DCE, because of a disagreement about what effect the clobber had. But for the reasons above, I think that was GIGO rather than a bug in DF or DCE. gcc/ PR rtl-optimization/108681 * lra-spills.cc (lra_final_code_change): Extend subreg replacement code to handle bare uses and clobbers. gcc/testsuite/ PR rtl-optimization/108681 * gcc.target/aarch64/pr108681.c: New test.
next prev parent reply other threads:[~2023-02-13 21:14 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-06 5:19 [Bug c++/108681] New: " raj.khem at gmail dot com 2023-02-06 5:41 ` [Bug middle-end/108681] " pinskia at gcc dot gnu.org 2023-02-06 6:08 ` [Bug rtl-optimization/108681] [13 Regression] " pinskia at gcc dot gnu.org 2023-02-06 7:56 ` rguenth at gcc dot gnu.org 2023-02-06 10:04 ` jakub at gcc dot gnu.org 2023-02-06 10:18 ` jakub at gcc dot gnu.org 2023-02-06 10:49 ` jakub at gcc dot gnu.org 2023-02-06 14:18 ` rsandifo at gcc dot gnu.org 2023-02-13 21:14 ` cvs-commit at gcc dot gnu.org [this message] 2023-02-13 21:18 ` rsandifo at gcc dot gnu.org 2023-02-14 8:01 ` Martin.Jansa at gmail dot com 2023-02-22 8:53 ` rguenth at gcc dot gnu.org 2023-02-22 8:54 ` [Bug rtl-optimization/108681] [12 " rguenth at gcc dot gnu.org 2023-03-02 13:17 ` herrtimson at yahoo dot de 2023-03-02 13:20 ` rsandifo at gcc dot gnu.org 2023-04-03 8:58 ` cvs-commit at gcc dot gnu.org 2023-04-03 9:04 ` rsandifo at gcc dot gnu.org
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-108681-4-RWfZU1QHuu@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).