From patchwork Sat Jun 6 05:12:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 481614 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 73F24140213 for ; Sat, 6 Jun 2015 15:12:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=hq2FjdFv; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject; q=dns; s=default; b=pGUC25iXfRdoAch R4WA9yxJMclfZwQxWEqAhwtdFLTqiHtZc94tR1KSTqeKyieToauUKpcOz+mODTCP X93MWYT6V8L9lMvsiHA2VC24B0xDzp7o7+8QrvPBerrR8TbECGWkN+Mupvn9s+Em 2Hwokw+B+NXjj4Gg+70IdljtPvxw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject; s=default; bh=mqChOD1JXgG+4NVNZCvju wnfpJ0=; b=hq2FjdFvAn+jpcuPigm2VQvmBUUz5tH9i5+SaufUmYyc4JHBvz8uW gpYrycqMYiEj9OIjihT1Smjr4jsDPorRxPMK7oJ9Ljfv/igzzBrOhXlzSW9mnobQ dBVjEjT1ki2BbnJSwmQyny4K3omE2rkDR4OUsEAF8MOS9IuQF3F1fo= Received: (qmail 81669 invoked by alias); 6 Jun 2015 05:12:28 -0000 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 Received: (qmail 81499 invoked by uid 89); 6 Jun 2015 05:12:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 06 Jun 2015 05:12:10 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 24341DBD for ; Sat, 6 Jun 2015 05:12:09 +0000 (UTC) Received: from greed.delorie.com (ovpn-113-25.phx2.redhat.com [10.3.113.25]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t565C8nn009303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 6 Jun 2015 01:12:08 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.14.4/8.14.4) with ESMTP id t565C7Kk022028; Sat, 6 Jun 2015 01:12:07 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id t565C60R022026; Sat, 6 Jun 2015 01:12:06 -0400 Date: Sat, 6 Jun 2015 01:12:06 -0400 Message-Id: <201506060512.t565C60R022026@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: pr64252.c: fix sizeof(int) assumption X-IsSubscribed: yes On targets with 2 byte "int" the vectors are 16 values long, which breaks the index count in __builtin_shuffle() using more than one input vector. Ok? * gcc.dg/pr64252.c: Fix assumption about sizeof(int). 2015-06-05 Thomas Koenig Index: gcc.dg/pr64252.c =================================================================== --- gcc.dg/pr64252.c (revision 224181) +++ gcc.dg/pr64252.c (working copy) @@ -1,11 +1,11 @@ /* PR target/64252 */ /* { dg-do run } */ /* { dg-options "-O2" } */ -typedef unsigned int V __attribute__((vector_size (32))); +typedef unsigned int V __attribute__((vector_size (sizeof(unsigned long) * 8))); __attribute__((noinline, noclone)) void foo (V *a, V *b, V *c, V *d, V *e) { V t = __builtin_shuffle (*a, *b, *c); V v = __builtin_shuffle (t, (V) { ~0U, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U, ~0U }, (V) { 0, 1, 8, 3, 4, 5, 9, 7 });