public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug rtl-optimization/100264] New: REE does not work on PARALLEL expressions with a single register SET child @ 2021-04-26 11:29 christophm30 at gmail dot com 2021-04-26 11:45 ` [Bug rtl-optimization/100264] " christophm30 at gmail dot com ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: christophm30 at gmail dot com @ 2021-04-26 11:29 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100264 Bug ID: 100264 Summary: REE does not work on PARALLEL expressions with a single register SET child Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: christophm30 at gmail dot com Target Milestone: --- REE iterates over all SET expressions and tries to eliminate redundant zero-extensions. In case of a PARALLEL expression, there is a check in place to ensure that "only one child of a PARALLEL expression is a SET". Let's imagine a PARALLEL expression with two register SETs. An example would be store-conditional, which sets a memory location (store target) as well as a register (return success value). The current implementation is not able to optimize a zero-extension of the return value of store-conditional. This can be solved, by moving the check for register targets (i.e. REG_P ()) into the function get_sub_rtx () and change the restriction of REE to "only one child of a PARALLEL expression is a SET register". ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/100264] REE does not work on PARALLEL expressions with a single register SET child 2021-04-26 11:29 [Bug rtl-optimization/100264] New: REE does not work on PARALLEL expressions with a single register SET child christophm30 at gmail dot com @ 2021-04-26 11:45 ` christophm30 at gmail dot com 2021-06-02 21:02 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: christophm30 at gmail dot com @ 2021-04-26 11:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100264 --- Comment #1 from Christoph M. <christophm30 at gmail dot com> --- A patch can be found here: https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568680.html It does not show any regressions (target riscv*). The patch does not include a new test case to demonstrate it actually works, because I don't know a generic way to test it. At the moment I am testing indirectly using __atomic_compare_and_exchange () on riscv64 to emit the required store-conditional. However, the code required for that is not merged yet. Ideas on how to test this in a more generic way are very much appreciated. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/100264] REE does not work on PARALLEL expressions with a single register SET child 2021-04-26 11:29 [Bug rtl-optimization/100264] New: REE does not work on PARALLEL expressions with a single register SET child christophm30 at gmail dot com 2021-04-26 11:45 ` [Bug rtl-optimization/100264] " christophm30 at gmail dot com @ 2021-06-02 21:02 ` cvs-commit at gcc dot gnu.org 2021-06-02 21:04 ` wilson at gcc dot gnu.org 2021-09-17 6:44 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-06-02 21:02 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100264 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jim Wilson <wilson@gcc.gnu.org>: https://gcc.gnu.org/g:d5ba2eaf7032f234fdcf11d9cfc513ce7be0a255 commit r12-1168-gd5ba2eaf7032f234fdcf11d9cfc513ce7be0a255 Author: Christoph Muellner <cmuellner@gcc.gnu.org> Date: Mon May 10 14:39:03 2021 +0200 REE: PR rtl-optimization/100264: Handle more PARALLEL SET expressions Move the check for register targets (i.e. REG_P ()) into the function get_sub_rtx () and change the restriction of REE to "only one child of a PARALLEL expression is a SET register expression" (was "only one child of a PARALLEL expression is a SET expression"). This allows to handle more PARALLEL SET expressions. gcc/ChangeLog: PR rtl-optimization/100264 * ree.c (get_sub_rtx): Ignore SET expressions without register destinations and remove assertion, as it is not valid anymore with this new behaviour. (merge_def_and_ext): Eliminate destination check for register as such SET expressions can't occur anymore. (combine_reaching_defs): Likewise. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/100264] REE does not work on PARALLEL expressions with a single register SET child 2021-04-26 11:29 [Bug rtl-optimization/100264] New: REE does not work on PARALLEL expressions with a single register SET child christophm30 at gmail dot com 2021-04-26 11:45 ` [Bug rtl-optimization/100264] " christophm30 at gmail dot com 2021-06-02 21:02 ` cvs-commit at gcc dot gnu.org @ 2021-06-02 21:04 ` wilson at gcc dot gnu.org 2021-09-17 6:44 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: wilson at gcc dot gnu.org @ 2021-06-02 21:04 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100264 Jim Wilson <wilson at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |wilson at gcc dot gnu.org Resolution|--- |FIXED --- Comment #3 from Jim Wilson <wilson at gcc dot gnu.org> --- Fixed on mainline. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/100264] REE does not work on PARALLEL expressions with a single register SET child 2021-04-26 11:29 [Bug rtl-optimization/100264] New: REE does not work on PARALLEL expressions with a single register SET child christophm30 at gmail dot com ` (2 preceding siblings ...) 2021-06-02 21:04 ` wilson at gcc dot gnu.org @ 2021-09-17 6:44 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-09-17 6:44 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100264 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |12.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-17 6:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-04-26 11:29 [Bug rtl-optimization/100264] New: REE does not work on PARALLEL expressions with a single register SET child christophm30 at gmail dot com 2021-04-26 11:45 ` [Bug rtl-optimization/100264] " christophm30 at gmail dot com 2021-06-02 21:02 ` cvs-commit at gcc dot gnu.org 2021-06-02 21:04 ` wilson at gcc dot gnu.org 2021-09-17 6:44 ` pinskia at gcc dot gnu.org
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).