From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31957 invoked by alias); 10 Apr 2003 15:32:28 -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 31940 invoked from network); 10 Apr 2003 15:32:28 -0000 Received: from unknown (HELO nikam.ms.mff.cuni.cz) (195.113.18.106) by sources.redhat.com with SMTP; 10 Apr 2003 15:32:28 -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 09D754DE86; Thu, 10 Apr 2003 17:32:29 +0200 (CEST) Received: by camelot.ms.mff.cuni.cz (sSMTP sendmail emulation); Thu, 10 Apr 2003 17:32:30 +0200 Date: Thu, 10 Apr 2003 16:31:00 -0000 From: Jan Hubicka To: Eric Botcazou Cc: Jan Hubicka , gcc@gcc.gnu.org Subject: Re: Reload bug Message-ID: <20030410153230.GD9319@kam.mff.cuni.cz> References: <200304081937.16859.ebotcazou@libertysurf.fr> <200304091105.24896.ebotcazou@libertysurf.fr> <20030409112544.GA12755@kam.mff.cuni.cz> <200304101201.50800.ebotcazou@libertysurf.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304101201.50800.ebotcazou@libertysurf.fr> User-Agent: Mutt/1.3.28i X-SW-Source: 2003-04/txt/msg00427.txt.bz2 > > Concerning this testcase, the reload used to manage to get around this > > problem. It didn't get around intentionally and just because the > > instruction contrain does not accept SSE register so reload is needed > > anyway. > > I think you're completely right: the reload pass has no specific > infrastructure for dealing with invalid subregs. It may "fix" these subregs, > but only if it happens that the operand needs reloading because of the insn > constraints. > > I now have an example: PR target/10286 > > We pass > > (insn 33 30 35 (set (subreg:SI (reg/v:DI 67) 4) > (mem/f:SI (plus:SI (reg/f:SI 16 argp) > (const_int 4 [0x4])) [0 hi+0 S4 A32])) 45 {*movsi_1} > (insn_list 30 (nil)) > > to reload, which produces > > (insn 33 30 35 (set (reg:SI 29 emm0) > (mem/f:SI (plus:SI (reg/f:SI 6 ebp) > (const_int 12 [0xc])) [0 hi+0 S4 A32])) 45 {*movsi_1} > (insn_list 30 (nil)) > (nil)) > > that is, the only reload for insn 33 is > > Reloads for insn # 33 > Reload 0: reload_in (SI) = (mem/f:SI (plus:SI (reg/f:SI 6 ebp) > (const_int 12 [0xc])) > [0 hi+0 S4 A32]) > GENERAL_REGS, RELOAD_FOR_INPUT (opnum = 1), optional > reload_in_reg: (mem/f:SI (plus:SI (reg/f:SI 6 ebp) > (const_int 12 [0xc])) > [0 hi+0 S4 A32]) > > > Incidentally, PR target/10286 is a regression from GCC 3.2 present in > GCC 3.2.1 and later. The culprit is this patch: > > Sat Oct 19 15:49:14 CEST 2002 Jan Hubicka > > * mmintrin.h (__m64): typedef it to v2si. > (_mm_cvtsi32_si64, _mm_cvtsi32_si64_mm_sll_pi16, > _mm_sll_pi32, _mm_sll_pi64, _mm_slli_pi64, _mm_sra_pi16, > _mm_sra_pi32, _mm_srl_pi16, _mm_srl_pi32, _mm_srl_pi64, > _mm_srli_pi64, _mm_and_si64, _mm_andnot_si64, > _mm_or_si64, _mm_xor_si64): Add neccesary casts. > * xmmintrin.h (_mm_setzero_si64): Likewise. > > See http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01091.html > > Before the patch, __m64 was defined as 'unsigned long long' so (%eax, %edx) > was used instead of %rmm0 and we didn't produce invalid subregs. I think > this patch has opened a can of worms and the MMX intrinsics are seriously > broken on the 3.2 branch now. They always have been - I've fixed 50+ different bugs exposed by simple testsuite executing each individual intrincisc with few diferent args, so I would not brother about this on the 3.2. 3.3 is different issue and should be the first GCC where intrincisc are generaly usable. I hope. Will look into this in the detail this evening, now I have about -10 minutes of time. Thanks! Honza > > -- > Eric Botcazou