public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vmakarov at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/56069] [4.6/4.7/4.8 Regression] RA pessimization Date: Tue, 22 Jan 2013 21:02:00 -0000 [thread overview] Message-ID: <bug-56069-4-FlZkurHCpD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-56069-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56069 Vladimir Makarov <vmakarov at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com --- Comment #2 from Vladimir Makarov <vmakarov at redhat dot com> 2013-01-22 21:01:21 UTC --- It is definitely regmove pass drawback. IRA can do nothing in this case. We have the following code before and after regmove: 2: r62:DI=di:DI 2: r63:DI=di:DI REG_DEAD di:DI REG_DEAD di:DI 6: {r64:DI=r62:DI 0>>0x3;clobber fla 6: {r63:DI=r63:DI 0>>0x3;clobber fl REG_DEAD r62:DI 7: r65:DI=0x100000000000 7: r65:DI=0x100000000000 8: {r63:DI=r64:DI|r65:DI;clobber fla 8: {r63:DI=r63:DI|r65:DI;clobber fl REG_DEAD r65:DI REG_DEAD r65:DI REG_DEAD r64:DI 13: ax:DI=r63:DI 13: ax:DI=r63:DI REG_DEAD r63:DI REG_DEAD r63:DI 16: use ax:DI 16: use ax:DI Regmove changes r64 to r63. It makes two equal hard reg preferences for r63: AX or DI. Choosing either one results in worse code. The original generated code can be achieved if regmove changes r65 to r63. In this case we have only one hard register preference for r63 (AX) and for r62 (DI). It can be achieved if regmove tries all orders of commutative operands (now regmove pass uses the first found order) using additional heuristics (live range length and/or number of preferred hard regs) to choose the best order. It is not a trivial change and can not be done for given release (gcc4.8). Also now we have LRA and may be such regmove transformations are not necessary. I am going to try this for gcc4.9 when I have more time. Still to assign ax to r65 and r63 we also need some hard register preference propagations in IRA which is currently absent. In any case, I think that older releases were just lucky and generated the best code as some passes before regmove put r65 as a first input operand.
next prev parent reply other threads:[~2013-01-22 21:02 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-21 17:37 [Bug rtl-optimization/56069] New: " jakub at gcc dot gnu.org 2013-01-21 21:56 ` [Bug rtl-optimization/56069] " vmakarov at gcc dot gnu.org 2013-01-22 21:02 ` vmakarov at redhat dot com [this message] 2013-01-22 21:10 ` [Bug rtl-optimization/56069] [4.6/4.7/4.8/4.9 " jakub at gcc dot gnu.org 2013-10-25 12:17 ` [Bug rtl-optimization/56069] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org 2013-12-20 21:23 ` law at redhat dot com 2013-12-20 22:40 ` vmakarov at gcc dot gnu.org 2014-04-22 11:36 ` [Bug rtl-optimization/56069] [4.7/4.8/4.9/4.10 " jakub at gcc dot gnu.org 2014-07-16 13:28 ` [Bug rtl-optimization/56069] [4.8/4.9/4.10 " jakub at gcc dot gnu.org 2014-10-30 10:39 ` [Bug rtl-optimization/56069] [4.8/4.9/5 " jakub at gcc dot gnu.org 2015-06-26 19:53 ` [Bug rtl-optimization/56069] [4.9/5/6 " jakub at gcc dot gnu.org 2015-06-26 20:26 ` jakub at gcc dot gnu.org 2020-03-12 11:58 ` [Bug rtl-optimization/56069] [7 " jakub at gcc dot gnu.org 2021-05-04 12:31 ` rguenth at gcc dot gnu.org 2021-06-01 8:05 ` rguenth at gcc dot gnu.org 2022-05-27 8:00 ` rguenth 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-56069-4-FlZkurHCpD@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).