public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "roger at nextmovesoftware dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/111267] [14 Regression] Codegen regression from i386 argument passing changes Date: Fri, 20 Oct 2023 22:49:57 +0000 [thread overview] Message-ID: <bug-111267-4-GPyJ2s4ocA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111267-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111267 --- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> --- This patch addresses the regression, but probably isn't the correct fix. The issue is that the backend now has a way of representing the concatenation of two registers (for example, TI is constructed for two DI mode registers): (set (reg:TI 111 [ bD.2764 ]) (ior:TI (ashift:TI (zero_extend:TI (reg:DI 142)) (const_int 64 [0x40])) (zero_extend:TI (reg:DI 141)))) But combine is unable to cleanly extract the (original) DI mode components back out of this using SUBREGs. Currently combine gets confused and attempts to match things like: Trying 10 -> 74: 10: r111:TI=zero_extend(r142:DI)<<0x40|zero_extend(r141:DI) REG_DEAD r141:DI REG_DEAD r142:DI 74: r137:DI=r111:TI#0 Failed to match this instruction: (parallel [ (set (reg:DI 137 [ bD.2764 ]) (reg:DI 141)) (set (reg:TI 111 [ bD.2764 ]) (ior:TI (ashift:TI (zero_extend:TI (reg:DI 142)) (const_int 64 [0x40])) (zero_extend:TI (reg:DI 141)))) ]) which contains the simplification we want, "reg:DI 137 := reg:DI 141", but along with stuff that combine should really take care off (strip/duplicate). I'll work on a more acceptable middle-end fix, but this patch demonstrates progress, and can be used if a more general solution can't be found.
next prev parent reply other threads:[~2023-10-20 22:49 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-01 12:55 [Bug rtl-optimization/111267] New: " manolis.tsamis at vrull dot eu 2023-09-12 10:43 ` [Bug rtl-optimization/111267] [14 Regression] " rguenth at gcc dot gnu.org 2023-10-17 12:34 ` rguenth at gcc dot gnu.org 2023-10-20 22:42 ` roger at nextmovesoftware dot com 2023-10-20 22:49 ` roger at nextmovesoftware dot com [this message] 2024-01-05 10:43 ` jakub at gcc dot gnu.org 2024-01-12 15:49 ` jakub at gcc dot gnu.org 2024-01-12 19:06 ` roger at nextmovesoftware dot com 2024-01-14 0:09 ` roger at nextmovesoftware dot com 2024-01-14 12:10 ` roger at nextmovesoftware dot com 2024-01-15 7:32 ` rguenth at gcc dot gnu.org 2024-01-16 1:15 ` roger at nextmovesoftware dot com 2024-01-21 21:25 ` cvs-commit at gcc dot gnu.org 2024-01-22 9:11 ` rsandifo at gcc dot gnu.org 2024-01-25 7:51 ` mkuvyrkov at gcc dot gnu.org 2024-01-25 7:55 ` clyon at gcc dot gnu.org 2024-01-25 9:48 ` mkuvyrkov at gcc dot gnu.org 2024-02-16 9:12 ` 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-111267-4-GPyJ2s4ocA@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).