From patchwork Fri Nov 27 11:41:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Krebbel X-Patchwork-Id: 549396 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 C5F14140319 for ; Fri, 27 Nov 2015 22:42:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=rU/o4Hh+; 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:from :to:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=oCozFS6gFMx+GwmnnxuA3fu7aGyvLrOoWsc7AsFT2M+Hk5J4S+lSJ CNUSdy2/vZ2GjDCCGGTw+w8FxizAUcXjsjzVgebT7v9ZNcjOKdB7FRdsFrYbw/tN H7hVUThb/vBOs0c9d8MKYGw3o0t6kOWTtpbmAQYOfHaJK/PVWXo3HE= 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:from :to:subject:date:message-id:in-reply-to:references; s=default; bh=Whi3bhLt0iyZJ5msN59CYHEuhBk=; b=rU/o4Hh+qh7CgHKxle/bzejyON7f /oIoMoQBZx8HRngR+eY88yhXufEhBnRc12Xo4MjWOCAz3dQuz7HP0OBgoEvOMsQv FbK1GzvdJHtpxflWzOdqc0B2xdI0uH1/pL3cFj8Oouup62SmeIsbOrZSsqzyv5By rO3MGrh34Z7+Ykk= Received: (qmail 103786 invoked by alias); 27 Nov 2015 11:41:59 -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 103747 invoked by uid 89); 27 Nov 2015 11:41:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e06smtp06.uk.ibm.com Received: from e06smtp06.uk.ibm.com (HELO e06smtp06.uk.ibm.com) (195.75.94.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 27 Nov 2015 11:41:58 +0000 Received: from localhost by e06smtp06.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Nov 2015 11:41:55 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp06.uk.ibm.com (192.168.101.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Nov 2015 11:41:53 -0000 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: krebbel@linux.vnet.ibm.com X-IBM-RcptTo: gcc-patches@gcc.gnu.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 067BF219005F for ; Fri, 27 Nov 2015 11:41:47 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tARBfrGg7668150 for ; Fri, 27 Nov 2015 11:41:53 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tARBfrhP028311 for ; Fri, 27 Nov 2015 04:41:53 -0700 Received: from maggie.ibm.com (icon-9-164-144-161.megacenter.de.ibm.com [9.164.144.161]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id tARBfqvj028272 (version=TLSv1/SSLv3 cipher=AES256-SHA256 bits=256 verify=NO) for ; Fri, 27 Nov 2015 04:41:53 -0700 From: Andreas Krebbel To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/7] S/390: Fix vrepi constraint letter. Date: Fri, 27 Nov 2015 12:41:46 +0100 Message-Id: <1448624512-22364-2-git-send-email-krebbel@linux.vnet.ibm.com> In-Reply-To: <1448624512-22364-1-git-send-email-krebbel@linux.vnet.ibm.com> References: <1448624512-22364-1-git-send-email-krebbel@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15112711-0025-0000-0000-00000508EDB7 X-IsSubscribed: yes gcc/ChangeLog: 2015-11-27 Andreas Krebbel * config/s390/vector.md ("*vec_splats"): Fix constraint latter I->K. gcc/testsuite/ChangeLog: 2015-11-27 Andreas Krebbel * gcc.target/s390/zvector/vec-splat-1.c: New test. --- gcc/config/s390/vector.md | 4 +-- .../gcc.target/s390/zvector/vec-splat-1.c | 42 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/s390/zvector/vec-splat-1.c diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md index 16276e0..d8b9b07 100644 --- a/gcc/config/s390/vector.md +++ b/gcc/config/s390/vector.md @@ -370,11 +370,11 @@ (define_insn "*vec_splats" [(set (match_operand:V_HW 0 "register_operand" "=v,v,v,v") - (vec_duplicate:V_HW (match_operand: 1 "general_operand" "QR,I,v,d")))] + (vec_duplicate:V_HW (match_operand: 1 "general_operand" "QR,K,v,d")))] "TARGET_VX" "@ vlrep\t%v0,%1 - vrepi\t%v0,%1 + vrepi\t%v0,%h1 vrep\t%v0,%v1,0 #" [(set_attr "op_type" "VRX,VRI,VRI,*")]) diff --git a/gcc/testsuite/gcc.target/s390/zvector/vec-splat-1.c b/gcc/testsuite/gcc.target/s390/zvector/vec-splat-1.c new file mode 100644 index 0000000..bab2e2d --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/zvector/vec-splat-1.c @@ -0,0 +1,42 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mzarch -march=z13 -mzvector" } */ + +#include + +vector signed char v16qi; +vector short v8hi; +vector int v4si; +vector long long v2di; + +vector unsigned char uv16qi; +vector unsigned short uv8hi; +vector unsigned int uv4si; +vector unsigned long long uv2di; + +int +foo () +{ + v16qi = vec_splats ((signed char)0x77); + uv16qi = vec_splats ((unsigned char)0x77); + + v8hi = vec_splats ((short int)0x7f0f); + uv8hi = vec_splats ((unsigned short int)0x7f0f); + + v4si = vec_splats ((int)0x7f0f); + uv4si = vec_splats ((unsigned int)0x7f0f); + + v2di = vec_splats ((long long)0x7f0f); + uv2di = vec_splats ((unsigned long long)0x7f0f); +} + +/* { dg-final { scan-assembler-times "vrepib\t%v.*,119" 1 } } */ +/* { dg-final { scan-assembler-times "vrepib\t%v.*,119" 1 } } */ + +/* { dg-final { scan-assembler-times "vrepih\t%v.*,32527" 1 } } */ +/* { dg-final { scan-assembler-times "vrepih\t%v.*,32527" 1 } } */ + +/* { dg-final { scan-assembler-times "vrepif\t%v.*,32527" 1 } } */ +/* { dg-final { scan-assembler-times "vrepif\t%v.*,32527" 1 } } */ + +/* { dg-final { scan-assembler-times "vrepig\t%v.*,32527" 1 } } */ +/* { dg-final { scan-assembler-times "vrepig\t%v.*,32527" 1 } } */