From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3072 invoked by alias); 28 Oct 2012 23:01:42 -0000 Received: (qmail 3032 invoked by uid 48); 28 Oct 2012 23:01:25 -0000 From: "olegendo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54963] [4.8 Regression] Wrong code generated for libgfortran/generated/eoshift3_8.c on SH Date: Sun, 28 Oct 2012 23:01:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: olegendo at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-10/txt/msg02659.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54963 --- Comment #3 from Oleg Endo 2012-10-28 23:01:24 UTC --- Created attachment 28551 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28551 Proposed patch This patch fixes the problem, by using 'emit_move_insn' instead of manually doing the DImode reg copy. I've seized the moment and refactored the abs patterns -- the T_REG clobber handling was a bit confusing and using mode iterators saves a few lines. Kaz, could you please have a look at this one? Only briefly tested with make-gcc and compiling CSiBE. There are no code size changes in the CSiBE set, except for one: jikespg-1.3 src/prntstat 3576 -> 3568 -8 / -0.223714 % I guess it's the T_REG clobber thing that has a positive impact on register allocation in this case.