From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29396 invoked by alias); 8 Mar 2009 16:35:22 -0000 Received: (qmail 29349 invoked by uid 48); 8 Mar 2009 16:35:09 -0000 Date: Sun, 08 Mar 2009 16:35:00 -0000 Message-ID: <20090308163509.29348.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/37633] [4.4 Regression] wrong register use on sh64 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "amylaar at gcc dot gnu dot org" 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: 2009-03/txt/msg00545.txt.bz2 ------- Comment #10 from amylaar at gcc dot gnu dot org 2009-03-08 16:35 ------- (In reply to comment #3) > I've checked the old RA. It does not assigned partially clobbered hard > register because it is done only when non partially clobbered hard regs were > tried first. Sh has a lot of such registers therefore the chance to generate > wrong code is small. > > I can simulate the same behaviour for IRA by increasing costs for partially > clobbered hard registers. Currently rs6000 and sh define > HARD_REGNO_CALL_PART_CLOBBERED. So even the problem is solved for sh in > different way, the patch increasing cost would be useful for rs6000. > > Still, as I wrote, the complete solution (the mentioned cost increase will be > still necessary in any case) would be save and restore partially clobbered > hard-registers in caller-saves.c. To avoid pessimizing code where partially clobbered registers are used to allocate pseudos which are not affected by the partial clobbers, the register allocator will have to provide caller_save.c with more information. It needs to know which registers are live across a call in excess of the part that is saved. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37633