From patchwork Fri Aug 10 16:09:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 176525 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 1D1862C0084 for ; Sat, 11 Aug 2012 02:17:38 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345220259; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:User-Agent:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=lbUAFH+ySdCEpwRVWwN5AhHSdDo=; b=Kzqnzf2tg/vOINd 8Xq9pNGX4q1TYu6Y6XApNqE1aOexoVdv63PqmjjdS2zGW7BYB9nRMYknVfoDJlTJ eZRUQxP5Tao96rZkcJrxeTwS2yJnL8F60PPAg9vE4qmdxHKtaEiNxEfqt9zpmFky sYAGeEUfV9ppklwXflLcnqPA45f8= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=LimDNhRcQx8mhwnVFk4H+v9JSmIbNlWK0CWYgyXSPOX90YgOQ6vBDDS3gP+vhf Q8eROcGDbaz+gNBdLppb5drYa3HTJOUo8ScpWu/FaoQQBoUluhxz4h5zcYxYG8va g37d5kTb+R57eLVGz1toRrhENOYT/3eyfrt0ab/I56CO4=; Received: (qmail 7087 invoked by alias); 10 Aug 2012 16:17:25 -0000 Received: (qmail 7059 invoked by uid 22791); 10 Aug 2012 16:17:22 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 10 Aug 2012 16:17:10 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7AGH9w2003956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Aug 2012 12:17:09 -0400 Received: from zalov.redhat.com (vpn1-4-226.ams2.redhat.com [10.36.4.226]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7AGH6G8016067 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 10 Aug 2012 12:17:09 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id q7AG9uf9013640; Fri, 10 Aug 2012 18:09:56 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id q7AG9tgP013639; Fri, 10 Aug 2012 18:09:55 +0200 Date: Fri, 10 Aug 2012 18:09:55 +0200 From: Jakub Jelinek To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix PR54219 Message-ID: <20120810160955.GE1999@tucnak.redhat.com> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Fri, Aug 10, 2012 at 01:07:33PM +0200, Richard Guenther wrote: > This fixes an error I introduced when making the VECTOR_CST representation > changes. > > Bootstrap and regtest pending on x86_64-unknown-linux-gnu. The test fails on i686-linux and guess many other targets, passing vector types as parameters/return values is generating various ABI warnings. The testcase fails/works the same if the vectors are passed through memory. Ok for trunk? 2012-08-10 Jakub Jelinek * gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly to avoid warnings. Jakub --- gcc/testsuite/gcc.dg/torture/vector-shuffle1.c.jj 2012-08-10 18:00:26.000000000 +0200 +++ gcc/testsuite/gcc.dg/torture/vector-shuffle1.c 2012-08-10 18:03:03.765134911 +0200 @@ -5,15 +5,16 @@ extern void abort (void); typedef int v2si __attribute__((vector_size(2*sizeof(int)))); -v2si f(v2si x) +void f(v2si *x) { /* This requires canonicalization of the mask to { 1, 0 }. */ - return __builtin_shuffle(x,x, (v2si) { 5, 0 }); + *x = __builtin_shuffle(*x, *x, (v2si) { 5, 0 }); } int main() { - v2si y = f((v2si) { 1, 2 }); + v2si y = { 1, 2 }; + f(&y); if (y[0] != 2 || y[1] != 1) abort (); return 0;