From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20911 invoked by alias); 16 Jul 2002 17:46:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20868 invoked by uid 71); 16 Jul 2002 17:46:02 -0000 Date: Tue, 16 Jul 2002 10:46:00 -0000 Message-ID: <20020716174602.20862.qmail@sources.redhat.com> To: amodra@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Geoff Keating Subject: Re: other/7114: ICE building strcoll.op from glibc-2.2.5 Reply-To: Geoff Keating X-SW-Source: 2002-07/txt/msg00493.txt.bz2 List-Id: The following reply was made to PR other/7114; it has been noted by GNATS. From: Geoff Keating To: amodra@bigpond.net.au Cc: d.mueller@elsoft.ch, gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org, dje@watson.ibm.com Subject: Re: other/7114: ICE building strcoll.op from glibc-2.2.5 Date: Tue, 16 Jul 2002 10:45:33 -0700 > Date: Tue, 16 Jul 2002 09:20:27 +0930 > From: Alan Modra > On Mon, Jul 15, 2002 at 12:43:02PM -0700, Geoff Keating wrote: > > > Date: Mon, 15 Jul 2002 18:56:03 +0930 > > > From: Alan Modra > > > > > This patch cures the testcase. The !using_store_multiple code tests > > > whether regs are live before saving. We need to do something similar > > > for using_store_multiple, in case all regs need not be saved. > > > > Those registers are actually saved, whether they need to be or not, > > correct? > > > > So the RTL generated is an accurate representation of the instruction, > > and the bug must be elsewhere. > > The testcase saves r30 and r31, but both are marked unused (don't > appear in regs_ever_live). Later rtl analysis decides that the > save instruction can be eliminated, thus the ICE. The real bug is > that r30 is not marked used when current_function_needs_context. > This is also the reason for PR5967. > > The code that I copied from the !using_store_multiple case just > papers over this bug. So the above patch merely makes -mmultiple > and -mno-multiple consistently wrong. No, the code below causes unused registers to actually not be saved, which is correct (it does sometimes happen that all uses of a register are eliminated after reload). This can be done when individual loads and stores are being used, you just don't emit that store. It can't be done when store-multiple is being used. -- - Geoffrey Keating