From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126047 invoked by alias); 12 May 2017 07:03:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 125352 invoked by uid 89); 12 May 2017 07:03:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=sum X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 May 2017 07:03:14 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A61A1AC65; Fri, 12 May 2017 07:03:15 +0000 (UTC) Date: Fri, 12 May 2017 07:22:00 -0000 From: Richard Biener To: Uros Bizjak cc: Rainer Orth , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Fix PR79201 (half-way) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2017-05/txt/msg00983.txt.bz2 On Thu, 11 May 2017, Uros Bizjak wrote: > On Thu, May 11, 2017 at 4:02 PM, Richard Biener wrote: > > >> > Uros added the testcase in 2008 -- I think if we want to have a testcase > >> > for the original issue we need a different one. Or simply remove > >> > the testcase. > >> > >> No, there is something going on in the testcase: > >> > >> .L3: > >> movq (%ecx,%eax,8), %mm1 > >> paddq (%ebx,%eax,8), %mm1 > >> addl $1, %eax > >> movq %mm1, %mm0 > >> cmpl %eax, %edx > >> jne .L3 > >> > >> > >> The compiler should allocate %mm0 to movq and paddq to avoid %mm1 -> > >> %mm0 move. These are all movv1di patterns (they shouldn't interfere > >> with movdi), and it is not clear to me why RA allocates %mm1 instead > >> of %mm0. > > > > In any case the testcase is no longer testing what it tested as the > > input to RA is now different. The testcase doesn't make much sense: > > Following is the cleaned testcase: > > --cut here-- > /* { dg-do compile { target ia32 } } */ > /* { dg-options "-O2 -msse2 -mtune=core2" } */ > /* { dg-additional-options "-mno-vect8-ret-in-mem" { target *-*-vxworks* } } */ > /* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */ > > #include > > typedef __SIZE_TYPE__ size_t; > > __m64 > unsigned_add3 (const __m64 * a, const __m64 * b, size_t count) > { > __m64 sum = { 0, 0 }; > > if (count > 0) > sum = _mm_add_si64 (a[count-1], b[count-1]); > > return sum; > } > > /* { dg-final { scan-assembler-times "movq\[ \\t\]+\[^\n\]*%mm" 1 } } */ > -- cut here-- > > The testcase still tests that only one movq is generated (gcc-4.1 > generated three). However, I have disabled the test on x86_64, since > x86_64 returns mmx values in XMM registers, and MMX -> XMM moves > always go through memory. Thank you very much. Richard.