public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/53623] [4.7/4.8 Regression] sign extension is effectively split into two x86-64 instructions Date: Mon, 11 Jun 2012 12:21:00 -0000 [thread overview] Message-ID: <bug-53623-4-TUDKvfZVjH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53623-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53623 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-11 12:20:45 UTC --- This is different from PR50176, at least the incomplete patch there wouldn't do anything for this testcase (the PR50176 problem is QImode and 32-bit IA-32 code with the unavailability of %sil/%dil/%bpl registers). The problem in this PR (at least that we don't generate the same code as 4.6 did) is that the REE pass doesn't do anything here, because of the && REGNO (dest) == REGNO (XEXP (src, 0)) check in add_removable_extension. We have (set (reg:HI %ax) (mem:HI (whatever))) (set (reg:DI %rdx) (sign_extend:DI (reg:HI %ax)) (set (reg:DI %rax) (zero_extend:DI (reg:QI %al)) and when processing the sign_extend, we give up because of that failed REGNO == REGNO check, and while we queue the zero_extend, that alone can't be optimized, both as it is a MEM:HI load, not QImode load, and because changing it into movzbl would make the sign extension wrong. Perhaps we could extend the REE pass for this slightly, by allowing REGNO != REGNO, if there is just a single reaching def and the REGNO != REGNO extension is the first use of that reg (i.e. all other uses are dominated by the extension being considered). Then perhaps we could attempt to change the load from loading into reg:HI %ax into sign extending load from HI to reg:DI %rdx, followed by either adding there a (set (reg:DI %rax) (reg:DI %rdx)) move where the sign extension currently is (and hoping some further pass will propagate that into all other uses), or changing all uses (from ax/al to dx/dl) right away.
next prev parent reply other threads:[~2012-06-11 12:21 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-10 2:50 [Bug target/53623] New: [4.7 " adam at consulting dot net.nz 2012-06-10 14:39 ` [Bug middle-end/53623] " hjl.tools at gmail dot com 2012-06-10 14:43 ` [Bug middle-end/53623] [4.7/4.8 " hjl.tools at gmail dot com 2012-06-10 23:32 ` adam at consulting dot net.nz 2012-06-11 9:47 ` rguenth at gcc dot gnu.org 2012-06-11 12:21 ` jakub at gcc dot gnu.org [this message] 2012-09-20 10:28 ` jakub at gcc dot gnu.org 2012-12-03 15:32 ` rguenth at gcc dot gnu.org 2013-04-11 8:00 ` [Bug middle-end/53623] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org 2013-12-13 5:24 ` law at redhat dot com 2014-01-08 6:03 ` law at redhat dot com 2014-01-08 6:03 ` law at gcc dot gnu.org 2015-02-15 14:06 ` hjl.tools at gmail dot com 2015-02-15 14:08 ` hjl.tools at gmail dot com 2015-02-15 16:03 ` [Bug middle-end/53623] [4.7/4.8 " hjl.tools at gmail dot com 2015-02-15 17:51 ` hjl.tools at gmail dot com 2015-02-16 9:00 ` [Bug middle-end/53623] [4.8 " rguenth at gcc dot gnu.org 2015-06-22 14:22 ` rguenth at gcc dot gnu.org 2015-06-23 8:46 ` 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-53623-4-TUDKvfZVjH@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).