From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22056 invoked by alias); 13 Dec 2013 05:24:43 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22022 invoked by uid 48); 13 Dec 2013 05:24:39 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/53623] [4.7/4.8/4.9 Regression] sign extension is effectively split into two x86-64 instructions Date: Fri, 13 Dec 2013 05:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.7.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg01120.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53623 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #8 from Jeffrey A. Law --- Jakub, I'm playing with some of your ideas from c#5. It's actually not a bad approach to fixing this problem. Presumably in the REGNO != REGNO case, if we were to allow it, the requirement that there be a single reaching def is so that we don't end up with different destination registers in the different reaching defs. Right? It also makes updating marginally easier as there's only one def to fixup. I don't offhand recall a good way to test that the extension under consideration dominates all the others. Can't they be in arbitrary blocks and locations within the blocks? And "all the others" presumably means other users of the original memory load, right? What did you have in mind for testing this? We definitely want to change the destination of the load to use the other register and emit a copy from the other register to the load's original destination. That insn needs to be emitted immediately after the defining insn. And yes, the hard register propagation pass should propagate away the copy most of the time. Anyway, it's showing enough promise that I'll keep poking.