From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11810 invoked by alias); 9 Apr 2003 08:59:53 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 11803 invoked from network); 9 Apr 2003 08:59:52 -0000 Received: from unknown (HELO nikam.ms.mff.cuni.cz) (195.113.18.106) by sources.redhat.com with SMTP; 9 Apr 2003 08:59:52 -0000 Received: from camelot.ms.mff.cuni.cz (kampanus.ms.mff.cuni.cz [195.113.18.107]) by nikam.ms.mff.cuni.cz (Postfix) with SMTP id BCEA94E2EF; Wed, 9 Apr 2003 10:59:52 +0200 (CEST) Received: by camelot.ms.mff.cuni.cz (sSMTP sendmail emulation); Wed, 9 Apr 2003 10:59:53 +0200 Date: Wed, 09 Apr 2003 09:49:00 -0000 From: Jan Hubicka To: Eric Botcazou Cc: Jan Hubicka , gcc@gcc.gnu.org Subject: Re: Reload bug Message-ID: <20030409085953.GF9102@kam.mff.cuni.cz> References: <200304081937.16859.ebotcazou@libertysurf.fr> <20030408212528.GC11492@kam.mff.cuni.cz> <200304090121.54636.ebotcazou@libertysurf.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304090121.54636.ebotcazou@libertysurf.fr> User-Agent: Mutt/1.3.28i X-SW-Source: 2003-04/txt/msg00354.txt.bz2 > > How it did detected that? > > /* If the outer part is a word or smaller, INNER larger than a > word and the number of regs for INNER is not the same as the > number of words in INNER, then INNER will need reloading. */ > return (GET_MODE_SIZE (mode) <= UNITS_PER_WORD > && GET_MODE_SIZE (GET_MODE (inner)) > UNITS_PER_WORD > && ((GET_MODE_SIZE (GET_MODE (inner)) / UNITS_PER_WORD) > != HARD_REGNO_NREGS (REGNO (inner), GET_MODE (inner)))) > > > I believe it is just pessimization masking a bug as currently there is no > > way how to realize that subreg:SI of MMX with offset 4 register is not > > valid (and with offset 0 is). > > Of course, it's pessimization when offset ==0, but it's correctness when > offset == 4. As for the choice between correctness and pessimization... > > > It should not get recognized earlier than in reload as we should not > > allocate value with subreg undoable in MMX register into MMX register > > (unless rest of insns dictates otherwise). We've chatted about this > > with Richard > > Then the culprit is local alloc. This is approximately what the patch I quoted does - it makes regclass to realize that it can't change mode this way. (it is not correct either as it prohibits (subreg:SI xmm:DI 0) that is valid but we don't have interface to declare this properly. > > > No, it is valid for high parts too as long as the register is possible > > (imagine the xmm being replaced by eax). I think we can add extra test > > realizing how large the registers are when index is nonzero. This will > > get bit tricky to get right when indexes are nonzero for lowparts. > > Then why not use ! lowpart? Because you can still have (subreg:sI eax:DI 4) Honza > > -- > Eric Botcazou