From patchwork Wed Feb 21 17:33:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: will schmidt X-Patchwork-Id: 876225 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-473669-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="GAjAW3fd"; dkim-atps=neutral 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 3zml2T2fTnz9sW5 for ; Thu, 22 Feb 2018 04:33:37 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:reply-to:to:cc:content-type:date:mime-version :content-transfer-encoding:message-id; q=dns; s=default; b=khMMT wo502Dhn+0or1clTOCFfFnfB9HWrK7zQL10jD6hWiKABC6EBt7d6bpGj9egKV8Nk FIW07O9yudDjSz6wu7ClDQWOL3jHIFZg0rJP2u3oBN9P1/xvQ0NrvRzAPVxDf0ov vzcdhnBTCLNIMQfOJLF0N/T8nyQQq0oVbaE/Wg= 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 :subject:from:reply-to:to:cc:content-type:date:mime-version :content-transfer-encoding:message-id; s=default; bh=7IvZFRCYztj PTTIuaTEbdjT9cGI=; b=GAjAW3fdsdVPV3FS30y/+YjSPjoIh8BWYi7/x9im9RG 80Uk9+UM1mF1IhJn6Ei49UUrhjZKmA0gkoSD3+DpfNH2APgSGjvcGMTuNUzIwtnC GynuNUZdld5Ae+POfDzuAVEJD1/QPDbL1dmAPX7Un7FJ0k+jkMfUvIbr3LeR1a0g = Received: (qmail 88266 invoked by alias); 21 Feb 2018 17:33:30 -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 88231 invoked by uid 89); 21 Feb 2018 17:33:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:altivec-7-be.c, altivec7bec, altivec-7-be.c X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Feb 2018 17:33:28 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1LHVxp5040598 for ; Wed, 21 Feb 2018 12:33:26 -0500 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0b-001b2d01.pphosted.com with ESMTP id 2g9d8dr1nr-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 21 Feb 2018 12:33:18 -0500 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Feb 2018 12:33:17 -0500 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 21 Feb 2018 12:33:15 -0500 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1LHXF2R45809830; Wed, 21 Feb 2018 17:33:15 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 57DFA11204B; Wed, 21 Feb 2018 12:31:23 -0500 (EST) Received: from [9.10.86.107] (unknown [9.10.86.107]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP id 1800F112054; Wed, 21 Feb 2018 12:31:23 -0500 (EST) Subject: [PATCH, rs6000] Update altivec-7 testcase(s). From: Will Schmidt Reply-To: will_schmidt@vnet.ibm.com To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool , David Edelsohn , Bill Schmidt Date: Wed, 21 Feb 2018 11:33:14 -0600 Mime-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18022117-0044-0000-0000-000003E7B3E4 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008570; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.00993047; UDB=6.00504559; IPR=6.00772392; MB=3.00019675; MTD=3.00000008; XFM=3.00000015; UTC=2018-02-21 17:33:16 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18022117-0045-0000-0000-00000817B9B9 Message-Id: <1519234394.11602.370.camel@brimstone.rchland.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-02-21_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802210213 X-IsSubscribed: yes Hi, This patch moves the vsx related content from the altivec-7-be test into a new vsx-7-be test. This fixes up some test failures as seen on older power systems. OK for trunk? Thanks, Will [testsuite] 2018-02-21 Will Schmidt * gcc.target/powerpc/altivec-7-be.c: Remove VSX content. * gcc.target/powerpc/altivec-7.h: Remove VSX content. * gcc.target/powerpc/vsx-7-be.c: New test. (Add VSX content). diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c b/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c index cbc31e6..9024159 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7-be.c @@ -19,17 +19,12 @@ */ /* { dg-final { scan-assembler-times "vpkpx" 2 } } */ /* { dg-final { scan-assembler-times "vmulesb" 1 } } */ /* { dg-final { scan-assembler-times "vmulosb" 1 } } */ -/* { dg-final { scan-assembler-times "lxvd2x" 6 } } */ /* { dg-final { scan-assembler-times "lvewx" 2 } } */ /* { dg-final { scan-assembler-times "lvxl" 1 } } */ /* { dg-final { scan-assembler-times "vupklsh" 1 } } */ /* { dg-final { scan-assembler-times "vupkhsh" 1 } } */ -/* { dg-final { scan-assembler-times "xxlnor" 4 } } */ -/* { dg-final { scan-assembler-times "xxland" 4 } } */ -/* { dg-final { scan-assembler-times "xxlxor" 5 } } */ -/* { dg-final { scan-assembler-times "vupkhpx" 1 } } */ /* Source code for the test in altivec-7.h */ #include "altivec-7.h" diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-7.h b/gcc/testsuite/gcc.target/powerpc/altivec-7.h index ff87deb..4dedcd8 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-7.h +++ b/gcc/testsuite/gcc.target/powerpc/altivec-7.h @@ -15,11 +15,10 @@ vector signed int *vecint; vector signed short *vecshort; vector unsigned char *vecuchar; vector unsigned int *vecuint; vector unsigned short *vecushort; vector float *vecfloat; -vector double *vecdouble; int main () { *vecfloat++ = vec_andc((vector bool int)vecint[0], vecfloat[1]); *vecfloat++ = vec_andc(vecfloat[0], (vector bool int)vecint[1]); @@ -41,10 +40,8 @@ int main () *vecushort++ = vec_vxor(vecushort[0], (vector bool short)vecshort[1]); *vecuint++ = vec_ld(var_int[0], uintp[1]); *vecuint++ = vec_lvx(var_int[0], uintp[1]); *vecuint++ = vec_vmsumubm(vecuchar[0], vecuchar[1], vecuint[2]); *vecuchar++ = vec_xor(vecuchar[0], (vector unsigned char)vecchar[1]); - *vecdouble++ = vec_unpackl(vecfloat[0]); - *vecdouble++ = vec_unpackh(vecfloat[0]); return 0; } diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c b/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c new file mode 100644 index 0000000..d5bb309 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-7-be.c @@ -0,0 +1,42 @@ +/* { dg-do compile { target powerpc64-*-* } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-mvsx" } */ + +/* This is an extension of altivec-7-be.c, with vsx target features included. */ + +/* Expected results for Big Endian: +(from altivec-7.h) + vec_packpx vpkpx + vec_ld lxv2x + vec_lde lvewx + vec_ldl lxvl + vec_lvewx lvewx + vec_andc xxnor + xxland + vec_vxor xxlxor + vec_vmsumubm vmsumubm + vec_vmulesb vmulesb + vec_vmulosb vmulosb +(from vsx-7.h) + vec_unpackl vupkhsh + vec_unpackh vupklsh +*/ + +/* { dg-final { scan-assembler-times "vpkpx" 2 } } */ +/* { dg-final { scan-assembler-times "vmulesb" 1 } } */ +/* { dg-final { scan-assembler-times "vmulosb" 1 } } */ +/* { dg-final { scan-assembler-times "lxvd2x" 6 } } */ +/* { dg-final { scan-assembler-times "lvewx" 2 } } */ +/* { dg-final { scan-assembler-times "lvxl" 1 } } */ +/* { dg-final { scan-assembler-times "vupklsh" 1 } } */ +/* { dg-final { scan-assembler-times "vupkhsh" 1 } } */ +/* { dg-final { scan-assembler-times "xxlnor" 4 } } */ +/* { dg-final { scan-assembler-times "xxland" 4 } } */ +/* { dg-final { scan-assembler-times "xxlxor" 5 } } */ +/* { dg-final { scan-assembler-times "vupkhpx" 1 } } */ + +/* Source code for the 'altivec' test in altivec-7.h */ +/* Source code for the 'vsx' required tests in vsx-7.h */ + +#include "altivec-7.h" +#include "vsx-7.h" diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-7.h b/gcc/testsuite/gcc.target/powerpc/vsx-7.h new file mode 100644 index 0000000..fe55472 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/vsx-7.h @@ -0,0 +1,18 @@ + +/* This test code is included into vsx-7-be.c. + * this is meant to supplement code in altivec-7.h. */ + +#include + + +vector float *vecfloat; +vector double *vecdouble; + +int main2 () +{ + + *vecdouble++ = vec_unpackl(vecfloat[0]); + *vecdouble++ = vec_unpackh(vecfloat[0]); + + return 0; +}